Created
March 4, 2017 06:20
-
-
Save phraniiac/5bbd787866a631d9b113175333df379a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def variable_summaries(var): | |
"""Attach a lot of summaries to a Tensor (for TensorBoard visualization).""" | |
with tf.name_scope('summaries'): | |
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment