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. P2P网贷第三方托管模式存在5大缺陷,护法是最大的赢家

    1.注冊开户须要2次,用户体验非常差劲儿.   理財人和借款人.首先在平台注冊,然后还要在第三方托管账户注冊.   非常多相似的地方,用户体验非常差劲.   比方.password4个.   平台:登 ...

  2. Misultin, Mochiweb, Cowboy, NodeJS 及 Tornadoweb测评

    http://www.oschina.net/translate/a-comparison-between-misultin-mochiweb-cowboy-nodejs-and-tornadoweb ...

  3. Display controller

    Field of the Invention The present invention relates to a display controller. Background to the inve ...

  4. Kail Linux渗透测试培训手册3第二章信息采集

    Kail Linux渗透测试培训手册3第二章信息采集 信息收集是网络攻击中最重要的步骤之一.渗透攻击.我们需要收集各种信息目标.该信息收集.攻击成功的概率越大.介绍信息收集的相关工具.本文选自< ...

  5. hbase 从hbase上读取数据写入到hdfs

    Mapper package cn.hbase.mapreduce.hb2hdfs; import java.io.IOException; import org.apache.hadoop.hbas ...

  6. [02]基于webservice权限系统

    面前,我们已经介绍过.如何使用cxf建立webservice. 那我们要介绍的这款许可制度表结构. 此权限管理系统分为部门管理.员工管理.角色管理,权限管理,授权的人才和企业管理(这里不涉及) 角色管 ...

  7. spring集成Quartz时区问题造成任务晚执行八小时

    项目中在Spring中集成了Quartz,配置的每日凌晨执行的定时任务都是到了八点多才执行,经过一番查找,可能是时区问题造成的. 一种解决办法是在JVM启动参数中增加 --Duser.timezone ...

  8. Indexing Sensor Data

    In particular embodiments, a method includes, from an indexer in a sensor network, accessing a set o ...

  9. PAT 1065 - 1068 题解

    这次的题目来源是 2013 年 10 月 7 日下午的浙大计算机研究生招生机试题. 这次题目的难度,按姥姥的说法是:『比普通的 PAT 要难了 0.5 个点.我是把自己的题目从 1.0 到 5.0 以 ...

  10. wpf控件开发基础(5) -依赖属性实践

    原文:wpf控件开发基础(5) -依赖属性实践 知识回顾 接上篇,回顾这三篇讲了什么东西 首先说明了属性的现存问题,然后介绍了依赖属性的基本用法及其解决方案,由于依赖属性以静态属性的方式存在,进而又介 ...