(var,idx)
Attach a lot of summaries to a Tensor (for TensorBoard visualization).
Attach a lot of summaries to a Tensor (for TensorBoard visualization).
Attach a lot of summaries to a Tensor ( for TensorBoard visualization ) .
def variable_summaries(var,idx):
  """Attach a lot of summaries to a Tensor (for TensorBoard visualization)."""
  with tf.name_scope('summaries_'+str(idx)):
    mean = tf.reduce_mean(var)
    tf.summary.scalar('mean', mean)
    with tf.name_scope('stddev'):
      stddev = tf.sqrt(tf.reduce_mean(tf.square(var - mean)))
    tf.summary.scalar('stddev', stddev)
    tf.summary.scalar('max', tf.reduce_max(var))
    tf.summary.scalar('min', tf.reduce_min(var))
    tf.summary.histogram('histogram', var)
def variable_summaries ( var , idx ) : with tf . name_scope ( 'summaries_' + str ( idx ) ) : mean = tf . reduce_mean ( var ) tf . summary . scalar ( 'mean' , mean ) with tf . name_scope ( 'stddev' ) : stddev = tf . sqrt ( tf . reduce_mean ( tf . square ( var - mean ) ) ) tf . summary . scalar ( 'stddev' , stddev ) tf . summary . scalar ( 'max' , tf . reduce_max ( var ) ) tf . summary . scalar ( 'min' , tf . reduce_min ( var ) ) tf . summary . histogram ( 'histogram' , var )