My goal: Add arbitrary text to tensorboard.
My code:
text = "muh teeeext"
summary = tf.summary.text("Muh taaaag", tf.convert_to_tensor(text))
writer.add_summary(summary)
My error:
File xxx, line xxx, in xxx
writer.add_summary(summary)
File "/home/xxx/.local/lib/python3.5/site-packages/tensorflow/python/summary/writer/writer.py", line 123, in add_summary
for value in summary.value:
AttributeError: 'Tensor' object has no attribute 'value'
writer.add_summary(summary)
is a tensor. the tensorboard writer expects a string for the summary. To get the summary from the tensor, add an eval()
to the add_summary
line like so:
writer.add_summary(summary).eval()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With