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
评论列表
文章目录