I was running TensorFlow and I happen to have something yielding a NaN. I\'d like to know what it is but I do not know how to do this. The main issue is that in a \"normal\"
First of all, you need to check you input data properly. In most cases this is the reason. But not always, of course.
I usually use Tensorboard to see whats happening while training. So you can see the values on each step with
Z = tf.pow(Z, 2.0)
summary_z = tf.scalar_summary('z', Z)
#etc..
summary_merge = tf.merge_all_summaries()
#on each desired step save:
summary_str = sess.run(summary_merge)
summary_writer.add_summary(summary_str, i)
Also you can simply eval and print the current value:
print(sess.run(Z))