TensorFlow Debugger (TFDBG) is a specialized debugger for TensorFlow's computation graphs. It provides access to internal graph structures and tensor values at TensorFlow runtime.
In TensorFlow‘s current computation-graph framework, almost all actual computation after graph construction happens in a single Python function, namely tf.Session.run. Basic Python debugging tools such as pdb cannot be used to debug Session.run
, due to the fact that TensorFlow’s graph execution happens in the underlying C++ layer. C++ debugging tools such as gdb are not ideal either, because of their inability to recognize and organize the stack frames and variables in a way relevant to TensorFlow's operations, tensors and other graph constructs.
TFDBG addresses these limitations. Among the features provided by TFDBG, the following ones are designed to facilitate runtime debugging of TensorFlow models: