December 2018
Intermediate to advanced
764 pages
18h 18m
English
You can fetch the tensor values you want to print with tf.Session.run(). The values are returned as a NumPy array and can be printed or logged with Python statements. This is the simplest and easiest approach, with the biggest drawback being that the computation graph executes all the dependent paths, starting from the fetched tensor, and if those paths include the training operations, then it advances one step or one epoch.
Therefore, most of the time you would not call tf.Session.run() to fetch tensors in the middle of the graph, but you would execute the whole graph and fetch all the tensors, the ones you need to debug along with the ones you do not need to debug.
Read now
Unlock full access