hourglass_tiny.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:hourglasstensorlfow 作者: wbenbihi 项目源码 文件源码
def _define_saver_summary(self, summary = True):
        """ Create Summary and Saver
        Args:
            logdir_train        : Path to train summary directory
            logdir_test     : Path to test summary directory
        """
        if (self.logdir_train == None) or (self.logdir_test == None):
            raise ValueError('Train/Test directory not assigned')
        else:
            with tf.device(self.cpu):
                self.saver = tf.train.Saver()
            if summary:
                with tf.device(self.gpu):
                    self.train_summary = tf.summary.FileWriter(self.logdir_train, tf.get_default_graph())
                    self.test_summary = tf.summary.FileWriter(self.logdir_test)
                    #self.weight_summary = tf.summary.FileWriter(self.logdir_train, tf.get_default_graph())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号