6

I would like to record in tensorboard some per-run information calculated by some python-blackbox function.

Specifically, I'm envisioning using sklearn.metrics.auc after having run sess.run().

If "auc" was actually a tensor node, life would be simple. However, the setup is more like:

stuff=sess.run()
auc=auc(stuff)

If there is a more tensorflow-onic way of doing this I am interested in that. My current setup involves creating separate train&test graphs.

If there is a way to complete the task as stated above, I am interested in that as well.

user3391229
  • 798
  • 9
  • 17

1 Answers1

10

You can make a custom summary with your own data using this code:

tf.Summary(value=[tf.Summary.Value(tag="auc", simple_value=auc)]))

Then you can add that summary to the summary writer yourself. (Don't forget to add a step).

dandelion
  • 1,742
  • 1
  • 15
  • 18
  • 5
    @danmane -- thanks for the answer, but what do you mean by, "don't forget to add a step"? – RobR Jul 30 '16 at 16:41
  • when you write .add_summary(tf.Summary(...), step), you need to include that step value, which is equal to your training step, otherwise your value won't update. – half-potato Sep 10 '18 at 21:53