1. AttributeError: 'module' object has no attribute 'SummaryWriter'

tf.train.SummaryWriter 改为:tf.summary.FileWriter

2. AttributeError: 'module' object has no attribute 'summaries'

tf.merge_all_summaries() 改为:summary_op = tf.summary.merge_all()

3. AttributeError: 'module' object has no attribute 'histogram_summary'

tf.histogram_summary() 改为:tf.summary.histogram()

tf.scalar_summary() 改为:tf.summary.scalar() 

tf.image_summary() 改为:tf.summary.image()

4. AttributeError: 'module' object has no attribute 'scalar_summary'

tf.scalar_summary('images', images) 改为:tf.summary.scalar('images', images)

tf.image_summary('images', images) 改为:tf.summary.image('images', images)

5. ValueError: Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)

cifar10.loss(labels, logits)

改为:cifar10.loss(logits=logits, labels=labels)

cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits, dense_labels, name='cross_entropy_per_example')

改为:cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=logits, labels=dense_labels, name='cross_entropy_per_example')

7. TypeError: Using a `tf.Tensor` as a Python `bool` is not allowed. Use `if t is not None:` instead of `if t:` to test if a tensor is defined.

if grad: 改为  if grad is not None:

8. ValueError: Shapes (2, 128, 1) and () are incompatible.

concated = tf.concat(1, [indices, sparse_labels]) 改为:concated = tf.concat([indices, sparse_labels], 1)

Tensorflow-常见报错解决方案的更多相关文章

  1. C语言开发中常见报错的解决方案

    C语言开发中常见报错的解决方案 整理来源于网络,侵权请通知删除.*禁止转载 ---- fatal error C1003: error count exceeds number; stopping c ...

  2. java常见报错及解决

    Java常见报错信息: Java 常见异常种类 Java Exception: 1.Error  2.Runtime Exception 运行时异常 3.Exception  4.throw 用户自定 ...

  3. HDFS集群常见报错汇总

    HDFS集群常见报错汇总 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.DataXceiver error processing WRITE_BLOCK operation 报 ...

  4. Git常用命令及常见报错:You have not concluded your merge (MERGE_HEAD exists)、清理无效的远程追踪分支

    一.常用命令 切换到master分支:git checkout master 查看已有本地及远程分支:git branch -a(先git pull拉下全部数据) 查看远程分支:git branch ...

  5. web报表工具FineReport使用中遇到的常见报错及解决办法(二)

    web报表工具FineReport使用中遇到的常见报错及解决办法(二) 这里写点抛砖引玉,希望大家能把自己整理的问题及解决方法晾出来,Mark一下,利人利己. 出现问题先搜一下文档上有没有,再看看度娘 ...

  6. 03:git常见报错解决方法

    1.1 git常见报错解决方法 1.warning: LF will be replaced by CRLF in .idea/workspace.xml. 参考博客:https://www.cnbl ...

  7. JavaScript 调试常见报错以及原因

    JavaScript 调试常见报错以及原因 测试环境 chrome 版本 66.0.3359.170(正式版本) (64 位) TypeError 类型错误 不是操作符所接受的数据类型. //---- ...

  8. Nginx 常见报错

    Nginx 常见报错 启动报错:[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) 原因:这个是nginx重启时经常遇到 ...

  9. Django 连接 MySQL 数据库及常见报错解决

    目录 Django 连接 MySQL数据库及常见报错解决 终端或者数据库管理工具连接 MySQL ,并新建项目所需数据库 安装访问 MySQL 的 Python 模块 Django 相关配置 可能会遇 ...

  10. 内置Jetty配置JSP支持过程中的常见报错

    目录 1. 常见报错及解决 1.1 JSP support not configured 1.2 JSTL标签解析 1.3 JSP编译 1.4 JSP实现依赖 1.5 EL表达式支持 2. 小结 1. ...

随机推荐

  1. iOS 利用FZEasyFile本地保存 和 常规保存

    1.常规保存(较麻烦) NSFileManager *fileManager = [NSFileManager defaultManager]; //获取document路径,括号中属性为当前应用程序 ...

  2. 【21.37%】【codeforces 579D】"Or" Game

    time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  3. Android菜鸟的成长笔记(21)——跨进程调用Service

    我们都知道在Android中的每一个应用是一个进程,其实每一个应用就相当于Linux系统里面的一个用户,进程和进程之间的通信其实就相当于用户和用户之间的通信,为了实现这种跨进程通信,Android提供 ...

  4. instsrv.exe用法

    这个小工具是用以安装和卸载可执行的服务和指派服务名给这些可执行的服务的.     一:绑定程序和服务 这里我们设定要将F:\cpu.exe 以 abc 的名称显示作为服务的话,我们应当这样子做: 在开 ...

  5. GridLayout网格布局

    网格布局特点: l  使容器中的各组件呈M行×N列的网格状分布. l  网格每列宽度相同,等于容器的宽度除以网格的列数. l  网格每行高度相同,等于容器的高度除以网格的行数. l  各组件的排列方式 ...

  6. OpenCL编程基本流程及完整示例

    1. 选择OpenCL平台并创建一个上下文 平台(Platform)是指主机和OpenCL管理框架下的若干个设备构成的可以运行OpenCL程序的完整硬件系统,这个是跑OpenCL程序的基础,所以第一步 ...

  7. numpy 下的数据结构与数据类型的转换(np.array vs. np.asarray)

    1. np.asarray -- numpy 风格的类型转换 从已有多维数组创建新的多维数组,数据类型可重新设置 >> B = np.asarray(A, dtype='int32') 2 ...

  8. Python 动图、动画制作 —— moviepy、matplotlib.animation

    进入命令行界面(windows ⇒ cmd),下载安装,pip install moviepy 0. figure 的成员函数 # 创建 figure fig, ax = plt.subplots() ...

  9. Cocos2dx 温馨提示(十)三种缓存类演示

    在介绍了三级缓存,首先,我们必须弄清楚的一个问题:什么是纹理?它的通俗的解释,质感是它的含义的图片. 当图像加载到内存中后,,它是存在于纹理的形式.由于从这里可以看出.纹理事实上就是一块内存.这块内存 ...

  10. VC绘制控件如何防止闪烁

    理论上不管什么控件都适用,方法如下: 新建一个MFC类,继承原来的控件类型,对于VC自动生成的类进行如下改动: 首先覆盖 OnEraseBkgnd() 防止擦除时填涂背景: BOOL CXXXCtrl ...