In Add_summary For Value In Summary.value: Attributeerror: 'tensor' Object Has No Attribute 'value'
This is a very basic tensorboard scalar log: import numpy as np import tensorflow as tf a = np.arange(10) x = tf.convert_to_tensor(a, dtype=tf.float32) x_summ = tf.summary.scalar('
Solution 1:
The value error is raised because you have to evaluate the summary node within a session.
with tf.Session() as sess:
s = sess.run(x_summ)
writer.add_summary(s)
But notice that this will raise another error, as you try to track 10 values in a scalar summary. But as I suppose that you will track some meaningful variable during training (like loss), this doesn't matter much.
Post a Comment for "In Add_summary For Value In Summary.value: Attributeerror: 'tensor' Object Has No Attribute 'value'"