TensorFlow 1.9.0版本更新

TensorFlow 1.9.0版本更新

主要的更新总结:
1. 更新了tf.kerasget startedprogrammers guide page文档。【中文版 Keras 教程
2. tf.keras.layers 中增加了 tf.keras.layers.CuDNNGRUtf.keras.layers.CuDNNLSTM
3. 标准 pip 安装包括了 tocotflite_convert 命令行工具
4. tf.keras.Model.save_weights 开始默认以 TensorFlow 格式保存参数。
5. 现在 dataset iterators 可以被传给 tf.keras.Model 的 training / eval 方法。



具体的更新内容见下面:

主要特征 及 改进

不兼容的更新

  • 创建空 variable scope 的方法从 variable_scope('', ...) 变为了 variable_scope(tf.get_variable_scope(), ...)
  • 用于构建自定义 ops 的头文件从 site-packages/external 中移动到了 site-packages/tensorflow/include/external 中

修复的 bug 和其他的更新

  • 宣布退化 tfe.Network。 取而代之,请从 tf.keras.Model 继承。虽然 tfe.Network 退化了,但短期还能用。

  • 下面两种情况下,层的变量的名字会发生改变:

    • 在使用 tf.keras.layers 时,自定义了varibale scope
    • tf.keras.Model 子类里使用 tf.layers。详情见 details

  • tf.data:

    • 为了去创建嵌套的生成器,Dataset.from_generator() 现在接收一个 args 列表。
    • 当指定了 shuffle=Falseseed 时,Dataset.list_files() 会产生确定的结果。
    • tf.contrib.data.sample_from_datasets()tf.contrib.data.choose_from_datasets() 使得从多个数据集中采样或确定性的选择一些元素变得容易。
    • tf.contrib.data.make_csv_dataset() now supports line breaks in quoted strings, and two infrequently used arguments removed.
    • (C++) DatasetBase::DebugString() is now const.
    • (C++) DatasetBase::MakeIterator() 已经被重命名为 DatasetBase::MakeIteratorInternal().
    • (C++) 添加了 IteratorBase::Initialize() 方法以支持在 iterator 的创建过程中 raise errors。

  • Eager Execution:

    • 添加了 tf.GradientTape.stop_recording 来支持 梯度计算 过程的暂停记录。
    • 更新了文档、介绍 notebools。

  • tf.keras:

    • 将 Keras 的代码从 _impl 文件夹中移出来了,并且去除了 API 文件。
    • tf.keras.Model.save_weights 现在默认以 TensorFlow 格式保存参数。
    • 现在 dataset iterators 可以被传给 tf.keras.Model 的 training / eval 方法。

  • TensorFlow Debugger (tfdbg)

    • Fix an issue in which the TensorBoard Debugger Plugin could not handle total source file size exceeding gRPC message size limit (4 MB).

  • tf.contrib:

    • tf.contrib.framework.zero_initializer supports ResourceVariable.
    • Adding “constrained_optimization” to tensorflow/contrib.

  • Other:

    • Add GCS Configuration Ops.
    • Changing signature of MakeIterator to enable propagating error status.
    • KL divergence for two Dirichlet distributions.
    • More consistent GcsFileSystem behavior for certain reads past EOF.
    • Update benchmark for tf.scan to match ranges across eager and graph modes.
    • Fixed bug in tf.reduce_prod gradient for complex dtypes.
    • Allow the use of ‘.’ in variables (e.g. “hparams.parse(‘a.b=1.0’)”), which would previously raise an error. This will correspond to an attribute name with an embedded ‘.’ symbol (e.g. ‘a.b’), which can only be accessed indirectly (e.g. through getattr and setattr). To set this up the user will first need to explicitly add the variable to the hparam object (e.g. “hparams.add_hparam(name=’a.b’, value=0.0)”).
    • Benchmark for tf.scan in graph and eager modes.
    • Added complex128 support to FFT, FFT2D, FFT3D, IFFT, IFFT2D, and IFFT3D.
    • Making ids unique in nn.embedding_lookup_sparse. This helps to reduce RPC calls for looking up the embeddings when there are repeated ids in the batch.
    • Support indicator column in boosted trees.
    • Prevent tf.gradients() from backpropagating through integer tensors.
    • LinearOperator[1D,2D,3D]Circulant added to tensorflow.linalg.
    • Conv3D, Conv3DBackpropInput, Conv3DBackpropFilter now supports arbitrary.
    • Added tf.train.Checkpoint for reading/writing object-based checkpoints.
    • Added LinearOperatorKronecker, a dense-free implementation of the Kronecker Product.
    • Allow LinearOperator to broadcast.
    • SavedModelBuilder will now deduplicate asset names that point to files with the same basename and the same contents. Note that this may result in new asset files included in SavedModels in cases where assets with the same name but different contents were previously overwriting each other.

一个小收获: tensorflow 中的 kerastensorflow 本体融合的确实深,基本上可以说:绝对兼容

来源:
TensorFlow 1.9.0版本更新:https://github.com/tensorflow/tensorflow/releases/tag/v1.9.0

猜你喜欢

转载自blog.csdn.net/u014061630/article/details/81052698