深入理解tensorflow我爱编程

Debug Tensorflow

2018-03-15  本文已影响27人  圣世修罗

命令行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$")

调试界面:

输入run 或者 run -t 10(sess.run 执行次数),

点击右侧Tensor可查看信息(print_tensor)

点击上方菜单栏可查看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

上一篇 下一篇

猜你喜欢

热点阅读