I'm new at tensorflow and I'm trying to follow this getting started tutorial. But executing this very simple code within "ex001.py" script:
import tensorflow as tf
sess = tf.Session
hello = tf.constant('Hello, TensorFlow!')
print(hello)
print(sess.run(hello))
I get the following output
Tensor("Const:0", shape=(), dtype=string) Traceback (most recent call last): File "C:\Users\Giuseppe\Desktop\ex001.py", line 6, in print(sess.run(hello)) TypeError: run() missing 1 required positional argument: 'fetches'
I've checked the tf.Session.run() syntax but looks right and I didn't find anyone with the same issue.
I'm running with this configuration:
Thanks in advance
Not sess = tf.Session
, it should be tf.Session()
, you are missing ()
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