Last active
March 22, 2017 18:28
-
-
Save ethanabrooks/859e24930c885af9b991c4a0bb62ebe4 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
import os | |
import shutil | |
from os.path import expanduser | |
import tensorflow as tf | |
summ = tf.summary.scalar('rand', tf.random_uniform(())) | |
summary_path = expanduser('~/tf_summaries') | |
if os.path.exists(summary_path): | |
shutil.rmtree(summary_path) | |
writer = tf.summary.FileWriter(summary_path) | |
sess = tf.Session() | |
for i in range(20): | |
summ_result = sess.run(summ) | |
writer.add_summary(summ_result, global_step=i) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment