大部分是Api版本问题:

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

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

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

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

tf.histogram_summary(var.op.name, var)
AttributeError: 'module' object has no attribute 'histogram_summary'

改为:  tf.summaries.histogram()

tf.scalar_summary(l.op.name + ' (raw)', l)
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)

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')

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, and use TensorFlow ops such as tf.cond to execute subgraphs conditioned on the value of a tensor.

if grad: 改为  if grad is not None:

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

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

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

Tensorflow1.0版本与以前函数不同之处的更多相关文章

  1. creator 2.0版本对于preloadScene函数获取加载进度

    有时候,当我们场景上挂载的资源过多时,我们使用cc.director.loadScene切换场景时会等一段时间才会切换过去,这对游戏的体验是相当不好的.所以我们可以使用cc.director.prel ...

  2. vue的生命周期(又称钩子函数)----以及vue1.0版本与vue2.0版本生命周期的不同

    vue生命周期 1. vue1.0版本与vue2.0版本生命周期的不同 vue1.0版本生命周期图示 图1  vue1.0版本生命周期 vue1.0版本的生命周期: init 实例创建之前 creat ...

  3. RDIFramework.NET ━ .NET快速信息化系统开发框架钜献 V3.0 版本强势发布

    继上个版本“RDIFramework.NET V2.9版本”的推出,受到了重多客户的认可与选择,V2.9版本是非常成功与稳定的版本,感谢大家的认可与长期以来的关注与支持.V3.0版本在V2.9版本的基 ...

  4. RDIFramework.NET平台代码生成器V3.0版本全新发布-更新于20160518(提供下载)

    最新版本请转到:RDIFramework.NET平台代码生成器V3.1版本全新发布-更新于2016-10-08(提供下载) RDIFramework.NET代码生成器V3.0版本修改了针对3.0版本的 ...

  5. 结对编程--基于android平台的黄金点游戏(2.0版本)

    在昨天上传完博客之后发现一个重大的bug...故在此推出2.0版本. 博文详情见:http://www.cnblogs.com/RayShea/p/5372398.html coding地址:http ...

  6. Spring.Net.FrameworkV3.0 版本发布了,感谢大家的支持

    Spring.Net.FrameworkV3.0 版本发布了,感谢大家的支持. Spring.Net.Framework,基于.NET的快速信息化系统开发.整合框架,为企业或个人在.NET环境下快速开 ...

  7. 【转】cocos2d-x 2.0版本 自适应屏幕分辨率

    http://codingnow.cn/cocos2d-x/975.html 我使用的版本是cocos2d-2.0-x-2.0.4,cocos2dx-2.0版本对多分辨率适配提供了很好的支持,使用起来 ...

  8. Inno Setup 精灵显示插件 InnoFairy (V2.0 版本)

    原文 http://restools.hanzify.org/article.asp?id=111 一个如影随形的小精灵会令到你的安装程序更加人性化. 就是这样一个功能的Inno Setup插件, 希 ...

  9. 图文解说PhpStorm 7.0版本语法着色

    前不久,我们测试了PhpStorm7.0版本对PHP 5.5的支持,今天我们将继续对PhpStorm 7.0版本对代码支持进行测试. 我们知道,在PhpStorm 6.0版本中,提供一个黑色背景的代码 ...

  10. uWSGI参考资料(1.0版本的配置选项列表)

    Reference: http://blog.csdn.net/kevin6216/article/details/15378617 uWSGI参考资料(1.0版本的配置选项列表) 下面的内容包含了大 ...

随机推荐

  1. python之路 57 linux 基础 命令与执行效果

    虚拟环境的安装与配置 1.VMware软件安装 这里有一个15版本和一个16版本的 链接:https://pan.baidu.com/s/1vkNxxQ6NS9q7XYJ6qiVMaQ 提取码:t3l ...

  2. python进阶之路10之函数

    函数前戏 name_list = ['jason', 'kevin', 'oscar', 'jerry'] # print(len(name_list)) '''突然len不准用了''' # coun ...

  3. Cert Manager 申请SSL证书流程及相关概念-三

    中英文对照表 英文 英文 - K8S CRD 中文 备注 certificates Certificate 证书 certificates.cert-manager.io/v1 certificate ...

  4. List_集合_介绍&常用方法-ArrayList集合

    List_集合_介绍&常用方法 我们掌握了Collection接口的使用后,再来看看Collection接口中的子类,他们都具备那些特性呢?接下来,我们一起学习Collection中的常用几个 ...

  5. 一小时学会微信小程序

    一小时学会微信小程序 目录 一.小程序概要 1.1.发展历史 1.2.小程序的诞生 二.微信小程序介绍 三.开发微信小程序的软件下载与初步配置  3.1.获取微信小程序的AppID 3.2.下载安装微 ...

  6. TypeScript 学习笔记 — 看官方文档

    TYPESCRITP OF GEEK NOTE 以后会更新这个完整度,和理解度,目前这个还不够 ts官方推荐使用let来替代 var ts 支持 js语法 声明变量 let temp:string = ...

  7. 线程基础知识06 synchronized---使用javap查看相关指令

    1 示例-简单同步代码块 public class SychTest9 { public static void main(String[] args) { Object o = new Object ...

  8. 微信小程序开卡步骤采坑过程艰难

    在网上看到别人的文件觉得都不对,差点被带入坑里了.主要注意部分已标红. 会员卡的card_id 获取路径: 1.从公众号中的会员卡中获取 2.通过公众号创建卡券接口返回中获取 接口1:获取开卡插件参数 ...

  9. [IOI2013]robots 机器人

    题目传送门 思路 简单题,设函数 \(f_i\) 表示当时间为 \(i\) 时是否能够收拾好所有玩具,则 \(f_i\) 显然是单调的. 所以我们可以考虑二分. 设我们当前二分到 \(x\),我们先把 ...

  10. 一位数左边补0,slice也可以

    以下三种方法都可以返回:"09" 1.n<10 ?'0'+n:''+n 2.('0'+n).slice(-2) 3.(''+n).padStart(2,'0')