slim_train_test.py 文件源码

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

项目:SSD_tensorflow_VOC 作者: LevinJ 项目源码 文件源码
def __add_summaries(self,end_points,learning_rate,total_loss):
        for end_point in end_points:
            x = end_points[end_point]
            tf.summary.histogram('activations/' + end_point, x)
            tf.summary.scalar('sparsity/' + end_point, tf.nn.zero_fraction(x))
        for loss in tf.get_collection(tf.GraphKeys.LOSSES):
            tf.summary.scalar('losses/%s' % loss.op.name, loss)
        # Add total_loss to summary.
        tf.summary.scalar('total_loss', total_loss)

        # Add summaries for variables.
        for variable in slim.get_model_variables():
            tf.summary.histogram(variable.op.name, variable)
        tf.summary.scalar('learning_rate', learning_rate)

        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号