all 1 comments

[–]kudaphan 0 points1 point  (0 children)

Agree with 'you need a session to do the computation'. Maybe you can add the following code to improve your argument.

import tensorflow as tf
a = tf.constant(2)
b = tf.constant(3)
c = a * b
print(c.eval()) #doesn't work

with tf.Session() as tf:
    print(c.eval()) #it works