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的更多相关文章

  1. tensorflow调试tfdbg

    tensorflow调试工具:tfdbg 使用教程:https://www.cnblogs.com/hellcat/articles/7812119.html 遇到的错误信息及解决方案 ModuleN ...

  2. 【TensorFlow】tfdbg调试注意事项

    按照网上的帖子开启tfdbg调试,可能因为没有安装curses和pyreadline包导致失败. 运行 python test001.py --debug 报错: ModuleNotFoundErro ...

  3. Tensorflow调试Bug解决办法记录

    1.ascii' codec can't encode characters in position 0-4: ordinal not in range(128) 原因是python2.X默认的编码是 ...

  4. Tensorflow之调试(Debug) && tf.py_func()

    Tensorflow之调试(Debug)及打印变量 tensorflow调试tfdbg 几种常用方法: 1.通过Session.run()获取变量的值 2.利用Tensorboard查看一些可视化统计 ...

  5. tensorflow tfdbg 调试手段

    https://blog.csdn.net/gubenpeiyuan/article/details/82710163 TensorFlow 调试程序 tfdbg 是 TensorFlow 的专用调试 ...

  6. 学习笔记TF063:TensorFlow Debugger

    TensorFlow Debugger(tfdbg),TensorFlow专用调试器.用断点.计算机图形化展现实时数据流,可视化运行TensorFlow图形内部结构.状态.有助训练推理调试模型错误.h ...

  7. TensorFlow API 汉化

    TensorFlow API 汉化 模块:tf   定义于tensorflow/__init__.py. 将所有公共TensorFlow接口引入此模块. 模块 app module:通用入口点脚本. ...

  8. TensorFlow 官方文档 Programmer's Guide 中文翻译 —— 引言

    TensorFlow Programmer's Guide (Introduction) TensorFlow 编程手册 (引言) #(本项目对tensorflow官网上给出的指导手册(TF1.3版本 ...

  9. Convolutional Neural Network in TensorFlow

    翻译自Build a Convolutional Neural Network using Estimators TensorFlow的layer模块提供了一个轻松构建神经网络的高端API,它提供了创 ...

随机推荐

  1. Shuffle 洗牌 [AHOI 2005]

    Description 为了表彰小联为 Samuel 星球的探险所做出的贡献,小联被邀请参加 Samuel 星球近距离载人探险活动. 由于 Samuel 星球相当遥远,科学家们要在飞船中度过相当长的一 ...

  2. mysql命令(command)

    连接mysql命令: -uuserName -pPassword 显示表的索引: SHOW INDDEX FROM table_name 查看mysql的超时时间:SHOW GLOBAL VARIAB ...

  3. Codeforces Round #428 (Div. 2) D. Winter is here 容斥

    D. Winter is here 题目连接: http://codeforces.com/contest/839/problem/D Description Winter is here at th ...

  4. strtok strchr strrchr strchrnul

    NAME       strchr, strrchr, strchrnul - locate character in string SYNOPSIS       #include <strin ...

  5. Python中关于列表排序并保留id/enumerate()使用方法

    新手才开始写博客,不周之处请原谅,有错误请指正. >>> a = [1,4,2,5,3]>>> b = sorted(enumerate(a),key = lamb ...

  6. oracle 连接

    1.简述  1) 两个表的连接,是通过将一个表中的一列或者多列同另一个表中的列链接而建立起来的.用来连接两张表的表达式组成了连接条件.当连接成功后,第二张表中的数据就同第一张表连接起来了,并形成了复合 ...

  7. fzu1062 洗牌问题(思路模拟)

    http://acm.fzu.edu.cn/problem.php?pid=1062 一开始想暴力找规律,没看出来..然后开始推,推测根据1再次返回第一个的时候顺序也复原,然后想以此推导出一个规律公式 ...

  8. Redis的快照持久化-RDB与AOF

    Redis持久化功能 Redis为了内部数据的安全考虑,会把本身的数据以文件形式保存到硬盘中一份,在服务器重启之后会自动把硬盘的数据恢复到内存(redis)的里边. 数据保存到硬盘的过程就称为“持久化 ...

  9. Java全栈程序员之07:IDEA中使用MAVEN构架生产级的Web项目

    在上一篇我们介绍了如何在IDEA中使用MAVEN,以及如何创建依赖等.那么在这一篇中,我们就试图搭建一个生产级的解决方案,大家可以使用这个解决方案作为骨架代码来搭建自己的开发环境. 在这里,我们要完成 ...

  10. Print all attributes and values in a Javascript Object

    function printObject(o) { var out = ''; for (var p in o) { out += '\n' + ':: ' + p + '(' + typeof(o[ ...