6

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'
1
  • In case anyone's wondering, this has something to do with a tensorboard update. Commented May 23, 2018 at 6:50

1 Answer 1

8

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()

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.