Created
March 28, 2019 05:47
-
-
Save joannapurosto/a28486a127cfa74ec51079c843845906 to your computer and use it in GitHub Desktop.
TensorBoard + Valohai Tutorial on Valohai blog
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
import tensorflow as tf | |
import time | |
tf.reset_default_graph() | |
myvar = tf.get_variable('myvar', shape=[]) | |
myvar_summary = tf.summary.scalar(name='Myvar', tensor=myvar) | |
init = tf.global_variables_initializer() | |
with tf.Session() as sess: | |
writer = tf.summary.FileWriter('./logs/run1', sess.graph) | |
for step in range(10): | |
sess.run(init) | |
summary = sess.run(myvar_summary) | |
writer.add_summary(summary, step) | |
print('step: %i' % step) | |
time.sleep(0.1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment