Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to directly write to summary which mimics scalar_summary?

I would like to achieve something like scalar_summary, but not used as a Op that takes a Variable. E.g. If I call

for i in 10000:
    value = 0.2 * i
    myfun(tag, value, i)

In tensorboard events I expect it generates a plot named tag, with a line in it.

How can I do that?

like image 675
colinfang Avatar asked Dec 15 '15 15:12

colinfang


1 Answers

Alternatively, if you want to generate a TensorBoard log in pure Python code, you can do the following:

summary_writer = tf.train.SummaryWriter(log_dir)
for i in 10000:
    value = 0.2 * i
    summary = tf.Summary(value=[tf.Summary.Value(tag=tag, simple_value=value)])
    summary_writer.add_summary(summary, global_step=i)
summary_writer.close()
like image 135
mrry Avatar answered Sep 24 '22 18:09

mrry