除法和取模运算符(/, //, %)现已匹配 Python(flooring)语义。这也适用于 tf.div 和 tf.mod。为了获取强制的基于整数截断的行为,你可以使用 tf.truncatediv 和 tf.truncatemod.

tf.divide 现在是推荐的除法函数。tf.div 还将保留,但其语义将不会响应 Python 3 或 from future 机制 .

tf.reverse 现在是将轴的索引反转。例如,tf.reverse ( a, [ True, False, True ] ) 现在必须写成 tf.reverse ( a, [ 0, 2 ] ) 。tf.reverse_v2 ( ) 暂时保留,直到 1.0 final 版 .

tf.mul、tf.sub 和 tf.neg 被弃用,现在使用的是 tf.multiply、tf.subtract 和 tf.negative.

tf.pack 和 tf.unpack 被启用,现在使用的是 tf.stack 和 tf.unstack.

TensorArray.pack 和 TensorArray.unpack 将被启用,取而代之的是 TensorArray.stack 和 TensorArray.unstack.

以下 Python 函数有参数修改,以在引用特定维度时使用 axis. 我们目前基于兼容性的考量而保留了原来的关键词参数,但我们将在 1.0 final 版中移除它们。

tf.argmax: dimension 变成 axis

tf.argmin: dimension 变成 axis

tf.count_nonzero: reduction_indices 变成 axis

tf.expand_dims: dim 变成 axis

tf.reduce_all: reduction_indices 变成 axis

tf.reduce_any: reduction_indices 变成 axis

tf.reduce_join: reduction_indices 变成 axis

tf.reduce_logsumexp: reduction_indices 变成 axis

tf.reduce_max: reduction_indices 变成 axis

tf.reduce_mean: reduction_indices 变成 axis

tf.reduce_min: reduction_indices 变成 axis

tf.reduce_prod: reduction_indices 变成 axis

tf.reduce_sum: reduction_indices 变成 axis

tf.reverse_sequence: batch_dim 变成 batch_axis, seq_dim 变成 seq_axis

tf.sparse_concat: concat_dim 变成 axis

tf.sparse_reduce_sum: reduction_axes 变成 axis

tf.sparse_reduce_sum_sparse: reduction_axes 变成 axis

tf.sparse_split: split_dim 变成 axis

tf.listdiff 已被重命名为 tf.setdiff1d 以匹配 NumPy 命名 .

tf.inv 已被重命名为 tf.reciprocal(分量互逆)以避免和矩阵求逆的 np.inv 混淆

tf.round 现在使用了四舍六入五留双规则语义,以匹配 NumPy.

tf.split 现在以相反的顺序取参数,并使用了不同的关键词。特别地,我们现在将 NumPy 顺序匹配成了 tf.split ( value, num_or_size_splits, axis ) .

tf.sparse_split 现在以相反的顺序取参数,并使用了不同的关键词。特别地,我们现在将 NumPy 顺序匹配成了 tf.sparse_split ( sp_input, num_split, axis ) . 注意:现在我们暂时让 tf.sparse_split 需要关键词参数 .

启用 tf.concat 运算符,现在请暂时切换成 tf.concat_v2 . 在 Beta 版中,我们将更新 tf.concat 以匹配 tf.concat_v2 的参数顺序 .

tf.image.decode_jpeg 默认使用更快的 DCT 方法 . 速度的提升牺牲了一点保真度。你可以通过特定属性 dct_method='INTEGER_ACCURATE' 来恢复原来的行为 .

tf.complex_abs 已被从 Python 接口移除 . 应该使用 tf.abs,它支持复数张量 .

模板 .var_scope 属性重命名为 .variable_scope

SyncReplicasOptimizer 被移除,SyncReplicasOptimizerV2 重命名为 SyncReplicasOptimizer.

tf.zeros_initializer ( ) 和 tf.ones_initializer ( ) 现在返回一个 callable,其必须用 initializer 参数调用,在你的代码中用 tf.zeros_initializer ( ) 替代 tf.zeros_initializer.

SparseTensor.shape 重命名为 SparseTensor.dense_shape. SparseTensorValue.shape 也一样 .

移除了原来的 tf summary 运算符,比如 tf.scalar_summary 和 tf.histogram_summary. 取而代之的是 tf.summary.scalar 和 tf.summary.histogram,参数也相应的发生了改变

移除 tf.train.SummaryWriter, 使用 tf.summary.FileWriter

tf.merge_all_summaries()改成了tf.sumary.merge_all

tensorflow1.0.0 弃用了几个operator写法的更多相关文章

  1. 深度学习环境搭建:Tensorflow1.4.0+Ubuntu16.04+Python3.5+Cuda8.0+Cudnn6.0

    目录 深度学习环境搭建:Tensorflow1.4.0+Ubuntu16.04+Python3.5+Cuda8.0+Cudnn6.0 Reference 硬件说明: 软件准备: 1. 安装Ubuntu ...

  2. Ubuntu16.04+CUDA8.0+cuDNN5.1+Python2.7+TensorFlow1.2.0环境搭建

    软件版本说明:我选的Linux系统是Ubuntu16.04,CUDA用的8.0,Ubuntu16.04+CUDA8.0+cuDNN5.1+Python2.7只支持TensorFlow1.3.0以下的版 ...

  3. windows10 + anaconda + tensorflow-1.5.0 + python-3.6 + keras-2.2.4配置和安装

    windows10 + anaconda + tensorflow-1.5.0 + python-3.6 + keras-2.2.4配置和安装 (base) C:\Users\jiangshan> ...

  4. windows10+Python3.6+Anaconda3+tensorflow1.10.0配置和安装

    windows10+Python3.6+Anaconda3+tensorflow1.10.0# Anaconda3安装自行下载安装,之后dos或Anaconda Prompt终端查看Anaconda3 ...

  5. 保姆级教程——Ubuntu16.04 Server下深度学习环境搭建:安装CUDA8.0,cuDNN6.0,Bazel0.5.4,源码编译安装TensorFlow1.4.0(GPU版)

    写在前面 本文叙述了在Ubuntu16.04 Server下安装CUDA8.0,cuDNN6.0以及源码编译安装TensorFlow1.4.0(GPU版)的亲身经历,包括遇到的问题及解决办法,也有一些 ...

  6. Tensorflow1.5.0+cuda9.0+cudnn7.0+gtx1080+ubuntu16.04

    目录 Tensorflow1.5.0+cuda9.0+cudnn7.0+gtx1080+ubuntu16.04 0. 前记 1. 环境说明 2. 安装GTX1080显卡驱动 3. CUDA 9.0安装 ...

  7. ubuntu 16.04 +anaconda3.6 +Nvidia DRIVER 390.77 +CUDA9.0 +cudnn7.0.4+tensorflow1.5.0+neural-style

    这是我第一个人工智能实验.虽然原理不是很懂,但是觉得深度学习真的很有趣.教程如下. Table of Contents 配置 时间轴 前期准备工作 anaconda3 安装 bug 1:conda:未 ...

  8. [转]android访问网络:java.net.ConnectException: localhost/127.0.0.1:8888 - Connection refused

    这对刚学会向tomcat模拟的本地服务器发送请求的同学非常重要! 转自:http://wing123.iteye.com/blog/1873763 描述:在做注册功能的时候,向本地服务器:127.0. ...

  9. Angular4.0.0正式版发布

    来源于angular4.0.0发布时的公告,译者:niithub 原文发布时间:Thursday, March 23, 2017 翻译时间:2017年3月24日 angular4.0.0正式版现在可以 ...

随机推荐

  1. django练习——博客系统优化

    一直准备使用Django搭建一个个人网站,最近终于开始动手,上周已经完成了基本博客功能的搭建(http://blog.csdn.net/hcx25909/article/details/2460133 ...

  2. Libgdx 1.5.4发布,跨平台游戏开发框架

    (原文链接:http://www.libgdx.cn/topic/70/libgdx-1-5-4%E5%8F%91%E5%B8%83) [1.5.4] 添加对Titled maps 的图像层的支持. ...

  3. JQuery设置checkbox的值,取checkbox的值,设置radio的值,取radio的值,设置下拉选select的值,取select的值

     一.复选框设置参数 html代码如下: <div class="flsm_btns">         <input type="hidden&q ...

  4. 1、libgdx简介

    Libgdx 是一个跨平台和可视化的的开发框架.它当前支持Windows,Linux,Mac OS X,Android,IOS和HTML5作为目标平台. Libgdx允许你一次编写代码不经修改部署到多 ...

  5. (三十)PickerView文字和随机数的使用

    PickerView用于展示供选择的内容(例如日期选取.点菜等). 有三种情况: 1.每一列都是独立的选取 2.右边的列受到左边列的影响 3.包含图片 PickerView和TableView类似,通 ...

  6. XML 处理利器 : XStream

    XStream 概述      XStream 是一套简洁易用的开发类库,用于将Java对象序列化为XML或者将XML反序列化为JAVA对象,是JAVA对象和XML之间一个双向转换器. 举例     ...

  7. 数据结构基础(1) --Swap & Bubble-Sort & Select-Sort

    Swap的简单实现 //C语言方式(by-pointer): template <typename Type> bool swapByPointer(Type *pointer1, Typ ...

  8. 动态获取html页面的内容,并且取其中的某块元素的方法

     $.ajax({  url: "http://192.168.1.59:8888/app-tpl-webapp/tpl/design.html",  async:false, ...

  9. REHL5上安装salt-minion

    REHL5上安装salt-minion 本文适用于rhel5.4, 6.4, 7. 仅以el5.4为例. 1 在线安装方式极为简单: # wget --no-check-certificate -O ...

  10. How to Simulate the Price Order or Price Line Function using API QP_PREQ_PUB.PRICE_REQUEST Includes

    How to Simulate the Price Order or Price Line Function using API QP_PREQ_PUB.PRICE_REQUEST Includes ...