It seems to be more convenient to simply use something like sub.eval()
instead of sess.run(eval)
, so would it be more convenient to always use InteractiveSession()
? Are there any tradeoffs if we were to use InteractiveSession()
all the time?
So far the only 'disadvantage' I see is that I can't use something like:
with tf.InteractiveSession() as sess:
result = product.eval() #Where product is a simple matmul
print result
sess.close()
Instead I've to just define sess = tf.InteractiveSession
right away.