In Tensorflow and Python, I am doing the following sort of thing to understand Tensorflow and debug code by observing multiple variables at the end of a computation.
with tf.Session():
print "var1 ="
print (var1.eval({x:myInputs, y:myOutputs}))
print "var2 ="
print (var2.eval({x:myInputs, y:myOutputs}))
Does Tensorflow rerun the entire graph computation for each eval()
call? Seems inefficient to rerun the entire graph just to print out one variable (tensor). If that is what is happening, is there a way to run the graph/process/eval once and then print out the values of each variable, without rerunning the entire graph?