TensorFlow 1.10.0版本更新

TensorFlow 1.10.0 主要更新

TensorFlow 1.10.0 更新总结:

  • tf.lite 运行时现在支持 complex64
  • tf.estimator.train_and_evaluate 可以直接进行评估(不需要重新加载 ckpt)
  • tf.train.MonitoredTrainingSession() 可以为 summary 和 checkpoint 指定不同的保存目录
  • 添加了 Graph Transform 工具
  • TensorFlow 默认不包含 NCCL

主要特点 及 改进

  • tf.lite 运行时现在支持 complex64
  • tf.data 初始集成 Bigtable。
  • 改善了 tf.estimator.train_and_evaluate 的局部运行行为:在 evaluation 中不再重新加载checkpoints。
  • 现在可以通过 RunConfig 中的 device_filters 去设置 workers 和 PS 之间的通讯方式。这在某些情况下能够加速训练、简化宕机设备的清理。如果你有一些 jobs 需要 workers 之间的通讯,你将需要在你的 RunConfig 中自定义 session_options。
  • 将 Distribution 和 Bijectors 从 tf.contrib.distributions 中移到了Tensorflow Probability (TFP) 中。tf.contrib.distributions 已经弃用,并将于 2018 年底前去除。
  • 添加了很多新的 api。推荐使用这些新的 api,这些新 api 未来可能取代一些现存的 api。新 api 主要被添加到了以下模块:tf.debuggingtf.dtypestf.imagetf.iotf.linalgtf.maniptf.mathtf.quantizationtf.strings

不兼容的改变 Breaking Changes

  • TensorFlow 1.10 预构建二进制文件是针对NCCL 2.2构建的,并且在二进制安装中不再包含NCCL。使用多个 GPU 和 NCCL 的需要将 NCCL 升级到 2.2。具体请参阅更新安装指南:Installing TensorFlow on UbuntuInstall TensorFlow from Sources.
  • 从TensorFlow 1.11 开始,Windows 构建将使用 Bazel。因此官方放弃了对 cmake 的支持。

修复的 bugs 和 一些其它的改变

  • tf.data 相关的改变:
    • tf.contrib.data.group_by_reducer() 被添加
    • tf.contrib.data.choose_from_datasets() 被添加
    • tf.data.Dataset.batch()tf.data.Dataset.padded_batch() 中添加了 drop_remainder 参数。
      tf.contrib.data.batch_and_drop_remainder()tf.contrib.data.padded_batch_and_drop_remainder() 将退化。

  • tf.estimator 相关的改变:
    • EstimatorEstimatorSpec scaffolds 中使用自定义 savers 在输出期间去保存 SavedModels。
    • 如果没有提供 export_outputEstimatorSpec 现在会添加一个默认的预测输出用于输出, 不再需要显式地在 model_fn 中包含一个 PredictOutput 对象。
    • 内置的 Linear Estimators 开始支持 sparse_combiner。
    • DNNClassifierDNNRegressorDNNEstimator 添加了 batch normalization。
    • 为 boosted trees 添加了 ranking 支持。
    • 为 boosted trees 添加了 center bias 选项。

  • get_variable() 添加了 synchronizationaggregation 参数。这些参数将被用于参数分布式。
  • 给 layer add_weight() API 添加了 synchronizationaggregation 参数。这些参数将被用于参数分布式。
  • 当处于 eager 模式时,tf.losses.* 不会被添加到全局 collection 中(为了避免内存泄漏)。
  • tf.train.MonitoredTrainingSession() 中,开始可以为 summary 和 checkpoint 指定不同的目录。
  • tf.contrib.rnn 中添加了 IndRNN,IndyGRU 和 IndyLSTM。
  • 为 Sparse Tensor 添加了静态工厂函数 并且将所有的 CHECKs 转化为了 DCHECKs。
    直接使用构造函数是不安全的,也不赞成使用。
  • Make the Bigtable client connection pool configurable & increase the default # of connections for performance.
  • Added derivative of tf.random_gamma with respect to the alpha parameter.
  • Added derivative of tf.igamma(a, x) and tf.igammac(a, x) with respect to a.
  • 修正了 0、1 阶 Bessel 函数。贝塞尔函数
  • Add FillTriangular Bijector to create triangular matrices.
  • Added support for Type III DCT, and tf.spectral.idct(type=2|3).
  • Correctly handle CuDNN RNN weight loaded when nest in TimeDistributed.
  • Adding per-element weight support for WALSComputePartialLhsAndRhsOp.
  • ZerosLike 和 OnesLike ops 被 Graph Tranform 工具看作常量。
  • Gamma 分布和派生的分布(Beta, Dirichlet, Student’s t, inverse Gamma)现在完全被重新参数化。
  • Java: Experimental wrapper classes to make graph generation easier. Thanks @karllessard and @kbsriram
  • Build & link in secure gRPC components (switch from the insecure grpc dependency to secure grpc dependency).
  • 给 TensorFlow 中添加了一些新的 api。推荐优先使用这些 api,因为这些 api 可能会替代一些现存的 api。下面是新添加的 api:
    • tf.image 中添加了:tf.image.extract_image_patches
    • tf.debugging 中添加了:tf.debugging.check_numerics, tf.debugging.is_finite, tf.debugging.is_inf, tf.debugging.is_nan.
    • tf.dtypes 中添加了:tf.dtypes.as_string.
    • tf.io 中添加了:tf.io.decode_base64, tf.io.decode_compressed, tf.io.decode_json_example, tf.io.decode_raw, tf.io.encode_base64, tf.io.matching_files, tf.io.parse_tensor, tf.io.read_file,tf.io.write_file`.
    • tf.linalg 中添加了:tf.linalg.cross, tf.linalg.tensor_diag (corresponds to tf.diag), tf.linalg.tensor_diag_part (corresponds to tf.diag_part).
    • tf.manip 中添加了:tf.manip.batch_to_space_nd, tf.manip.gather_nd, tf.manip.reshape, tf.manip.reverse, tf.manip.scatter_nd, tf.manip.space_to_batch_nd, tf.manip.tile
    • tf.math 中添加了:tf.math.acos, tf.math.acosh, tf.math.add, tf.math.asin, tf.math.asinh, tf.math.atan, tf.math.atan2, tf.math.atanh, tf.math.betainc, tf.math.ceil, tf.math.cos, tf.math.cosh, tf.math.digamma, tf.math.equal, tf.math.erfc, tf.math.exp, tf.math.expm1, tf.math.floor, tf.math.greater, tf.math.greater_equal, tf.math.igamma, tf.math.igammac, tf.math.invert_permutation, tf.math.less, tf.math.less_equal, tf.math.lgamma, tf.math.log, tf.math.log1p, tf.math.logical_and, tf.math.logical_not, tf.math.logical_or, tf.math.maximum, tf.math.minimum, tf.math.not_equal, tf.math.polygamma, tf.math.reciprocal, tf.math.rint, tf.math.rsqrt, tf.math.segment_max, tf.math.segment_mean, tf.math.segment_min, tf.math.segment_prod, tf.math.segment_sum, tf.math.sin, tf.math.sinh, tf.math.softplus, tf.math.softsign, tf.math.squared_difference, tf.math.tan, tf.math.unsorted_segment_max, tf.math.unsorted_segment_min, tf.math.unsorted_segment_prod, tf.math.unsorted_segment_sum, tf.math.zeta.
    • tf.quantization 中添加了:tf.quantization.dequantize, tf.quantization.fake_quant_with_min_max_args, tf.quantization.fake_quant_with_min_max_args_gradient, tf.quantization.fake_quant_with_min_max_vars, tf.quantization.fake_quant_with_min_max_vars_gradient, tf.quantization.fake_quant_with_min_max_vars_per_channel, tf.quantization.fake_quant_with_min_max_vars_per_channel_gradient.
    • tf.strings 中添加了: tf.strings.join (对应 tf.string_join), tf.strings.regex_replace, tf.strings.to_number (对应 tf.string_to_number), tf.strings.strip (对应 tf.string_strip), tf.strings.substr, tf.strings.to_hash_bucket (对应 tf.string_to_hash_bucket), tf.strings.to_hash_bucket_fast (对应 tf.string_to_hash_bucket_fast), tf.strings.to_hash_bucket_strong (对应 tf.string_to_hash_bucket_strong).

英文原版:https://github.com/tensorflow/tensorflow/blob/r1.10/RELEASE.md

猜你喜欢

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