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. erlang 中带下划线变量的使用

    在erlang里'_'是一个特殊的变量(其实erlang里不应该叫“变”量,照顾习惯,姑且这么叫吧),它可以代替任何东西,在match的时候非常有用,例如: {A, _, [B|_], {B}} =  ...

  2. 关于JDBC连接数据库时出现的Public Key Retrieval is not allowed错误

    问题描述 最近在学习MyBatis框架,参考官方的文档通过配置文件的方式已经实现了通过Configuration配置文件和mapper映射文件访问mysql8数据库,于是想试试不使用XML文件去构建S ...

  3. simlescalar CPU模拟器源代码分析

    Sim-outorder.c Main性能 Fetch  -->  despetch-->                                issue-->       ...

  4. Java、JVM、JRE、JDK等组件的理解

    .java ⇒(javac) .classs ⇒ (类加载器)转换后的 .class 文件 ⇒ (解释器)可执行代码 ⇒ (JIT 编译器)⇒ 机器码 0. 虚拟机 Java 有它的虚拟机:Java ...

  5. Topshelf组件

    使用Topshelf组件构建简单的Windows服务   很多时候都在讨论是否需要了解一个组件或者一个语言的底层原理这个问题,其实我个人觉得,对于这个问题,每个人都有自己的看法,个人情况不同,选择的方 ...

  6. 使用UISegementControl实现简易Tomcat程序

    // // TomViewController.m #import "TomViewController.h" #import <AVFoundation/AVFoundat ...

  7. WPF多线程UI更新

    前言 在WPF中,在使用多线程在后台进行计算限制的异步操作的时候,如果在后台线程中对UI进行了修改,则会出现一个错误:(调用线程无法访问此对象,因为另一个线程拥有该对象.)这是很常见的一个错误,一不小 ...

  8. Windows Serverserver结束MySQL自己主动数据库备份

    1.给root所有授权的帐户sql才干 grant all privileges on *.* to root@"%" identified by "."; f ...

  9. NYOJ781 又见回文数

    又见回文数 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描写叙述 冷淡的回文数被水了,各种被水,然后他非常生气,然后... 一个数从左边读和从右边读一样,就说这个数是回文数 ...

  10. C++异常处理入门

    引言 异常,让一个函数可以在发现自己无法处理的错误时抛出一个异常,希望它的调用者可以直接或者间接处理这个问题.而传统错误处理技术,检查到一个局部无法处理的问题时: 1.终止程序(例如atol,atoi ...