tensorflow 调试tfdbg
1、执行pip install pyreadline 安装pyreadline
2、修改对应代码如下
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
sess = tfdbg.LocalCLIDebugWrapperSession(sess,ui_type="readline")#添加这个
sess.add_tensor_filter("has_inf_or_nan", tfdbg.has_inf_or_nan) #添加这个
3 直接运行脚本 tfdbg后输入run 输出如下界面 其中Tensor name为tensorflow变量名 如果没给变量指定 name 无法确定那个是自己查看的变量

4 通过 h_pool2_flat = tf.reshape(h_pool2, [-1, 7*7*64],name="h_pool2_flat") name给h_pool2_flat设置名字为h_pool2_flat
可以在tfdbg中输入 pt h_pool2_flat:0 输出变量值
pt Tensor name:0可以输出指定变量名

tensorflow 调试tfdbg的更多相关文章
- tensorflow调试tfdbg
tensorflow调试工具:tfdbg 使用教程:https://www.cnblogs.com/hellcat/articles/7812119.html 遇到的错误信息及解决方案 ModuleN ...
- 【TensorFlow】tfdbg调试注意事项
按照网上的帖子开启tfdbg调试,可能因为没有安装curses和pyreadline包导致失败. 运行 python test001.py --debug 报错: ModuleNotFoundErro ...
- Tensorflow调试Bug解决办法记录
1.ascii' codec can't encode characters in position 0-4: ordinal not in range(128) 原因是python2.X默认的编码是 ...
- Tensorflow之调试(Debug) && tf.py_func()
Tensorflow之调试(Debug)及打印变量 tensorflow调试tfdbg 几种常用方法: 1.通过Session.run()获取变量的值 2.利用Tensorboard查看一些可视化统计 ...
- tensorflow tfdbg 调试手段
https://blog.csdn.net/gubenpeiyuan/article/details/82710163 TensorFlow 调试程序 tfdbg 是 TensorFlow 的专用调试 ...
- 学习笔记TF063:TensorFlow Debugger
TensorFlow Debugger(tfdbg),TensorFlow专用调试器.用断点.计算机图形化展现实时数据流,可视化运行TensorFlow图形内部结构.状态.有助训练推理调试模型错误.h ...
- TensorFlow API 汉化
TensorFlow API 汉化 模块:tf 定义于tensorflow/__init__.py. 将所有公共TensorFlow接口引入此模块. 模块 app module:通用入口点脚本. ...
- TensorFlow 官方文档 Programmer's Guide 中文翻译 —— 引言
TensorFlow Programmer's Guide (Introduction) TensorFlow 编程手册 (引言) #(本项目对tensorflow官网上给出的指导手册(TF1.3版本 ...
- Convolutional Neural Network in TensorFlow
翻译自Build a Convolutional Neural Network using Estimators TensorFlow的layer模块提供了一个轻松构建神经网络的高端API,它提供了创 ...
随机推荐
- 2017.07.10【NOIP提高组】模拟赛B组
Summary 今天题目总体不是难,但是分数很低,只有100+10+30,其中第二题还是以前做过的,第一题设计数论,而且以前做过同一个类型的题目,比赛推了很长时间.第三题时以前做过的原题,是贪心没学好 ...
- Android 修改应用图标(Android Studio)
1 res\drawable 放置icon.png(此图片是你需要修改的图标,必须是png文件). 2 修改AndroidManifest.xml: android:icon="@drawa ...
- NodeJS Web模块
NodeJS Web模块 本文介绍nodeJS的http模块的基本用法,实现简单服务器和客户端 经典Web架构 Client:客户端一般指浏览器,通过HTTP协议向服务器发送请求(request) S ...
- R图表入门
R图表入门 R语言最强的功能就是统计和作图了,在学习了基本语法之后,博主马上体验了一下R的图表功能 条形图 例1 H = c(7,12,28,3,41) M = c("Mar",& ...
- python-猜数字小练习
isdigit的使用方法,只能对str类型的适用,判断输入的字符串里面是不是仅由数字组成: 本次在写这个小程序时踩到的坑:1.int类型和字符串类型不可以做比较:2.在input下面对guess做了类 ...
- zepto 选中select option 的值
1,网上搜的,感觉蛮好用的,先存着 $('#sel').find('option').not(function() {return !this.selected;}).val();
- html冲刺
html知识点回顾与面试题<!--1.<DOCTYPE>告诉浏览器当前文档要以何种HTML或者XHTML规范解析2.语义标签strong 粗体em 斜体del 删除线ins 下划线 ...
- jQuery 学习04——遍历:定义、向上、向下、同级、过滤
Query 遍历,意为"移动",用于根据其相对于其他元素的关系来"查找"(或选取)HTML 元素. 以某项选择开始,并沿着这个选择移动,直到抵达您期望的元素为止 ...
- 如何在MyBatis中优雅的使用枚举
问题 在编码过程中,经常会遇到用某个数值来表示某种状态.类型或者阶段的情况,比如有这样一个枚举: public enum ComputerState { OPEN(10), //开启 CLOSE( ...
- Creating an LMDB database in Python
LMDB is the database of choice when using Caffe with large datasets. This is a tutorial of how to cr ...