命令行TensorFlow调试器:使用调试器包装器包装Session对象
from tensorflow.python import debug as tfdbg
sess = tfdbg .LocalCLIDebugWrapperSession( tf.Session() )
出现Value Error:XXX not found in partition graphs,添加参数thread_name_filter。仅Tensorflow1.2以上可用。
sess = tfdbg.LocalCLIDebugWrapperSession(tf.Session(), thread_name_filter="MainThread$")
调试界面:
![](https://img.haomeiwen.com/i2330218/5e9e805d70a59fa2.png)
输入run 或者 run -t 10(sess.run 执行次数),
![](https://img.haomeiwen.com/i2330218/64e94e2affa9fa0e.png)
点击右侧Tensor可查看信息(print_tensor)
![](https://img.haomeiwen.com/i2330218/7e04cd8c845eed40.png)
点击上方菜单栏可查看Tensor相应信息。
更多操作查看以下参考地址。
http://python.usyiyi.cn/documents/tensorflow_13/programmers_guide/debugger.html
TensorFlow Debugger(tfdbg)命令行界面教程:MNIST - TensorFlow - ApacheCN(Apache中文网)
TFDBG 'PyFunc' is not found in partition graphs. · Issue #8753 · tensorflow/tensorflow · GitHub
网友评论