Debug Tensorflow

命令行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

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容