user3868971
user3868971

Reputation: 9

AttributeError: module 'tensorflow.python.summary.summary' has no attribute 'scalar'

I've been trying to study tensorboard (from tensorflow (forked from github, using the latest version as well) and getting the above error whenever I use 'scalar' or 'histogram' functions. Why is the scalar function being pointed to tensorflow.python.summary.summary? (shouldn't it be tensorflow.python.summary?) Would be great if someone could help! I'm attaching the code here:

import tensorflow as tf
x = tf.Variable(tf.random_normal(5,5))
tf.summary.scalar('input', x)

The ouput is :

Traceback (most recent call last):
File "tensorboardetest.py", line 4, in <module>
tf.summary.scalar('input', x)
AttributeError: module 'tensorflow.python.summary.summary' has no attribute 'scalar'

Upvotes: 1

Views: 1895

Answers (1)

chris
chris

Reputation: 1893

You're not actually using the latest version of TensorFlow. :)

Upvotes: 1

Related Questions