Tensorflow1.0版本与以前函数不同之处
大部分是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版本与以前函数不同之处的更多相关文章
- creator 2.0版本对于preloadScene函数获取加载进度
有时候,当我们场景上挂载的资源过多时,我们使用cc.director.loadScene切换场景时会等一段时间才会切换过去,这对游戏的体验是相当不好的.所以我们可以使用cc.director.prel ...
- vue的生命周期(又称钩子函数)----以及vue1.0版本与vue2.0版本生命周期的不同
vue生命周期 1. vue1.0版本与vue2.0版本生命周期的不同 vue1.0版本生命周期图示 图1 vue1.0版本生命周期 vue1.0版本的生命周期: init 实例创建之前 creat ...
- RDIFramework.NET ━ .NET快速信息化系统开发框架钜献 V3.0 版本强势发布
继上个版本“RDIFramework.NET V2.9版本”的推出,受到了重多客户的认可与选择,V2.9版本是非常成功与稳定的版本,感谢大家的认可与长期以来的关注与支持.V3.0版本在V2.9版本的基 ...
- RDIFramework.NET平台代码生成器V3.0版本全新发布-更新于20160518(提供下载)
最新版本请转到:RDIFramework.NET平台代码生成器V3.1版本全新发布-更新于2016-10-08(提供下载) RDIFramework.NET代码生成器V3.0版本修改了针对3.0版本的 ...
- 结对编程--基于android平台的黄金点游戏(2.0版本)
在昨天上传完博客之后发现一个重大的bug...故在此推出2.0版本. 博文详情见:http://www.cnblogs.com/RayShea/p/5372398.html coding地址:http ...
- Spring.Net.FrameworkV3.0 版本发布了,感谢大家的支持
Spring.Net.FrameworkV3.0 版本发布了,感谢大家的支持. Spring.Net.Framework,基于.NET的快速信息化系统开发.整合框架,为企业或个人在.NET环境下快速开 ...
- 【转】cocos2d-x 2.0版本 自适应屏幕分辨率
http://codingnow.cn/cocos2d-x/975.html 我使用的版本是cocos2d-2.0-x-2.0.4,cocos2dx-2.0版本对多分辨率适配提供了很好的支持,使用起来 ...
- Inno Setup 精灵显示插件 InnoFairy (V2.0 版本)
原文 http://restools.hanzify.org/article.asp?id=111 一个如影随形的小精灵会令到你的安装程序更加人性化. 就是这样一个功能的Inno Setup插件, 希 ...
- 图文解说PhpStorm 7.0版本语法着色
前不久,我们测试了PhpStorm7.0版本对PHP 5.5的支持,今天我们将继续对PhpStorm 7.0版本对代码支持进行测试. 我们知道,在PhpStorm 6.0版本中,提供一个黑色背景的代码 ...
- uWSGI参考资料(1.0版本的配置选项列表)
Reference: http://blog.csdn.net/kevin6216/article/details/15378617 uWSGI参考资料(1.0版本的配置选项列表) 下面的内容包含了大 ...
随机推荐
- 自研ORM框架实现工作单元模式
平时我们使用事务,需要显示的Try Catch 并且开启事务 提交事务 异常回滚事务 三步骤,使用工作单元后则只需要Commit. 1.接口定义 1 /// <summary> 2 /// ...
- MongoDB - 分片简介
简介 什么是分片 高数据量和高吞吐量的数据库应用会对单机的性能造成较大压力,大的查询会将单机的 CPU 耗尽,大的数据量对单机的存储压力较大,最终会耗尽系统的内存压力转移到磁盘 IO 上. 为了解决这 ...
- AspNetCore管道
title: Asp.Net Core底层源码剖析(一)中间件/管道 categories: 后端 tags: - .NET 当我们像下面这样添加一个管道时发生了什么? app.Use(async ( ...
- SPOJ PHONELST - Phone List | UVA11362 Phone List | LibreOJ10049. 「一本通 2.3 例 1」Phone List
简要题意 \(t\) 组数据,每组数据给定 \(n\) 个长度不超过 \(10\) 的数字串,判断是否有两个字符串 \(A\) 和 \(B\),满足 \(A\) 是 \(B\) 的前缀,若有,输出 N ...
- Java基础学习笔记-类的静态属性和静态方法--待继续补充
程序运行时的内存占用 代码区(code area) 存放代码 数据区(data area) 存放全局数据.静态数据 堆区(heap area) 存放动态申请的数据 栈区(stack area) 存放局 ...
- Flutter2.X学习之路--调试页面布局好用的办法
Flutter里有个很好用的东西,可以方便我们来进行页面组件的布局调试,话不多说,上代码 1.找到main.dart引入rendering.dart import 'package:flutter/r ...
- angular配置多个系统 配置动态路由,缩短模块初次加载时间,快速打开界面,优化用户访问体验
1.配置一个文件,返回系统名称 2.配置routes-routing.module.ts 引入文件 const system = 服务.getsystem() const allROUTES: {UR ...
- qt虚拟键盘编译时报错缺乏qpa/qplatforminputcontext.h文件
ubuntu20.04 :sudo apt-get install qtbase5-private-dev
- MRS_MounRiver安装与驱动相关问题汇总
解决问题如下: MounRiver下载与安装 若MounRiver某些功能不全或插件没安装 MounRiver下载与安装 MRS官网下载:http://www.mounriver.com/downlo ...
- 从 Cloud-Native Relational DB 看数据库设计
论文内容:Amazon Aurora: Design Considerations for HighThroughput Cloud-Native Relational Databases 里面介绍了 ...