exercise/fm_dssm.py
def variable_summaries(var, name):
	"""Attach a lot of summaries to a Tensor."""
	with tf.name_scope('summaries'):
		mean = tf.reduce_mean(var)
		tf.summary.scalar('mean/' + name, mean)
		with tf.name_scope('stddev'):
			stddev = tf.sqrt(tf.reduce_sum(tf.square(var - mean)))
		tf.summary.scalar('sttdev/' + name, stddev)
		tf.summary.scalar('max/' + name, tf.reduce_max(var))
		tf.summary.scalar('min/' + name, tf.reduce_min(var))
		tf.summary.histogram(name, var)
Attach a lot of summaries to a Tensor.
Attach a lot of summaries to a Tensor.
Attach a lot of summaries to a Tensor .
def variable_summaries(var, name):
	with tf.name_scope('summaries'):
		mean = tf.reduce_mean(var)
		tf.summary.scalar('mean/' + name, mean)
		with tf.name_scope('stddev'):
			stddev = tf.sqrt(tf.reduce_sum(tf.square(var - mean)))
		tf.summary.scalar('sttdev/' + name, stddev)
		tf.summary.scalar('max/' + name, tf.reduce_max(var))
		tf.summary.scalar('min/' + name, tf.reduce_min(var))
		tf.summary.histogram(name, var)
def variable_summaries ( var , name ) : with tf . name_scope ( 'summaries' ) : mean = tf . reduce_mean ( var ) tf . summary . scalar ( 'mean/' + name , mean ) with tf . name_scope ( 'stddev' ) : stddev = tf . sqrt ( tf . reduce_sum ( tf . square ( var - mean ) ) ) tf . summary . scalar ( 'sttdev/' + name , stddev ) tf . summary . scalar ( 'max/' + name , tf . reduce_max ( var ) ) tf . summary . scalar ( 'min/' + name , tf . reduce_min ( var ) ) tf . summary . histogram ( name , var )
Attach a lot of summaries to a Tensor.
Attach a lot of summaries to a Tensor .
"""Attach a lot of summaries to a Tensor."""
var
name