I plan on building a mode for emacs that
includes syntax highlighting and keyboard
macros, but I’ll have to wait until
Wrapping TensorFlow Sessions With
Add the following lines of code to use tfdbg and then contain the Session object using a debugger wrapper.
- CLI should be called before and after
Session.run()if you wish to take control of the execution and know the internal state of the graph.
- Filters can be added for assisting the diagnosis.
In the provided example, there is already a filter called
tfdbg.has_inf_or_nan, which determine the presence of
infin any in-between tensors, which are neither inputs nor outputs.
- You may write your own custom filters.
Debugging TensorFlow Model Training with
This only works for TensorFlow 1 at the moment.
- finding NaNs
- finding Infs (infinities)
python3.7 scripts put me in the
tfdbg CLI does not appear in tensorflow 2.0.
TF Debugger (tfdbg) for TF v2.0 is still being designed and will be made available at a later time.
As you pointed out,
tfdbg is originally
designed for TF v1.x and is centered around
tf.Session is replaced by eager execution and
tf.functions in 2.0, the debugger feature
needs to be adapted to the architectural
If you have a specific use case (e.g., finding Infinities and NaNs, or other debugging workflows), please let us know.
It’ll inform the design of the new version of tfdbg.