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,它提供了创 ...
随机推荐
- 如何提高sql查询速度
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索 ...
- printf scanf cin cout的区别与特征
printf和scanf是c语言的输入输出,学习c++以后,自然是用cin cout这两个更简单的输入输出 printf scanf 都需要进行格式控制,比较麻烦,但优点是速度比较快,毕竟多做了一些事 ...
- python之迭代器篇
一.迭代器 只要对象本身有_iter_()_方法,那它就是可迭代的 执行__iter__就会生成迭代器 迭代器有__next__用于获取值 __next__超出界限了会报StopIteration异常 ...
- JSAP107
JSAP107 1.目标 2. 需要考虑的问题: 案例:图片随着鼠标飞兼容性代码 <!DOCTYPE html> <html lang="en"> < ...
- JDBC(12)—DBUtils工具类
DBUtils:commons-dbutils是Apache组织提供的一个开源JDBC工具库,它是对JDBC的简单封装,并且使用dbutils会极大的简化jdbc编码的工作量,同时不会影响到程序的性能 ...
- poj2456 Aggressive cows(二分查找)
https://vjudge.net/problem/POJ-2456 二分,从最大长度开始,不断折半试,如果牛全放下了,就是可行,修改下界,否则改上届. #include<iostream&g ...
- java C 类自动转换规则
C类型转换规则
- Multiple Tasks Z
public static async Task executeParallel<T>(this IEnumerable<T> items, int limit, Func&l ...
- SharePoint REST 服务获取讨论版问题
前言 最近,有这么个需求,需要获取讨论版里的问题,然后汇总,这里就考虑用REST服务了. 1.我们先创建这么一个讨论版列表,然后添加一些问题,如下图: 2.然后需要开发REST服务代码了,如下图: 3 ...
- shell编程学习笔记(十一):Shell中的while/until循环
shell中也可以实现类似java的while循环 while循环是指满足条件时,进行循环 示例: #! /bin/sh index=10 while [ $index -gt 0 ] do inde ...