john-mueller
john-mueller

Reputation: 117

How to debug in Tensorflow2?

I am new to Tensorflow and am currently working on Tensorflow2. I'm still having a hard time writing code, because I don't have the possibility to debug.

I already tried to get further with the line:

tf.executing_eagerly()

and

tf.print()

but this is only a small help compared to the "normal" debugging in python.

Is there a better possibility to debug the code and to view the content of variables?

The only thing I currently get is this view, but that doesn't give me any insight into the actual variables either:enter image description here

Upvotes: 0

Views: 587

Answers (1)

Abhishek Verma
Abhishek Verma

Reputation: 1729

Rather than using tf.print, use the normal Python's print if you are eagerly executing. You will be able to see the contents of the variables.

Upvotes: 1

Related Questions