Dare I even ask? This is such a new technology at this point that I can\'t find a way to solve this seemingly simple error. The tutorial I\'m going over can be found here- http:
I encountered a similar error when I tried a simple tensorflow example.
import tensorflow as tf
v = tf.Variable(10, name="v")
sess = tf.Session()
sess.run(v.initializer)
print(v.eval())
My solution is to use sess.as_default(). For example, I changed my code to the following and it worked:
import tensorflow as tf
v = tf.Variable(10, name="v")
with tf.Session().as_default() as sess:
sess.run(v.initializer)
print(v.eval())
Another solution can be use InteractiveSession. The difference between InteractiveSession and Session is that an InteractiveSession makes itself the default session so you can run() or eval() without explicitly call the session.
v = tf.Variable(10, name="v")
sess = tf.InteractiveSession()
sess.run(v.initializer)
print(v.eval())