From 827d2e4b9180db67853f60c125e548d83986b96c Mon Sep 17 00:00:00 2001 From: Eugene Brevdo Date: Mon, 22 May 2017 17:32:50 -0700 Subject: Move many of the "core" RNNCells and rnn functions back to TF core. Unit test files will move in a followup PR. This is the big API change. The old behavior (using tf.contrib.rnn....) will continue to work for backwards compatibility. PiperOrigin-RevId: 156809677 --- RELEASE.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'RELEASE.md') diff --git a/RELEASE.md b/RELEASE.md index 02bdbd4297..ec24d6fd80 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,7 +4,7 @@ * Added `tf.layers.conv3d_transpose` layer for spatio temporal deconvolution. * Added `tf.Session.make_callable()`, which provides a lower overhead means of running a similar step multiple times. * Added ibverbs-based RDMA support to contrib (courtesy @junshi15 from Yahoo). -* `RNNCell` objects now subclass `tf.layers._Layer`. The strictness described +* `RNNCell` objects now subclass `tf.layers.Layer`. The strictness described in the TensorFlow 1.1 release is gone: The first time an RNNCell is used, it caches its scope. All future uses of the RNNCell will reuse variables from that same scope. This is a breaking change from the behavior of RNNCells @@ -17,18 +17,33 @@ parameters, write: `MultiRNNCell([LSTMCell(...) for _ in range(5)])`. If at all unsure, first test your code with TF 1.1; ensure it raises no errors, and then upgrade to TF 1.2. +* RNNCells' variable names have been renamed for consistency with Keras layers. + Specifically, the previous variable names "weights" and "biases" have + been changed to "kernel" and "bias", respectively. + This may cause backward incompatibility with regard to your old + checkpoints containing such RNN cells, in which case you can use the tool + [checkpoint_convert script](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/rnn/python/tools/checkpoint_convert.py) + to convert the variable names in your old checkpoints. +* Many of the RNN functions and classes that were in the `tf.nn` namespace + before the 1.0 release and which were moved to `tf.contrib.rnn` have now + been moved back to the core namespace. This includes + `RNNCell`, `LSTMCell`, `GRUCell`, and a number of other cells. These + now reside in `tf.nn.rnn_cell` (with aliases in `tf.contrib.rnn` for backwards + compatibility). The original `tf.nn.rnn` function is now `tf.nn.static_rnn`, + and the bidirectional static and state saving static rnn functions are also + now back in the `tf.nn` namespace. + + Notable exceptions are the `EmbeddingWrapper`, `InputProjectionWrapper` and + `OutputProjectionWrapper`, which will slowly be moved to deprecation + in `tf.contrib.rnn`. These are inefficient wrappers that should often + be replaced by calling `embedding_lookup` or `layers.dense` as pre- or post- + processing of the rnn. For RNN decoding, this functionality has been replaced + with an alternative API in `tf.contrib.seq2seq`. ## Bug Fixes and Other Changes * In python, `Operation.get_attr` on type attributes returns the Python DType version of the type to match expected get_attr documentation rather than the protobuf enum. -* tensorflow/contrib/rnn undergoes RNN cell variable renaming for - consistency with Keras layers. Specifically, the previous variable names - "weights" and "biases" are changed to "kernel" and "bias", respectively. - This may cause backward incompatibility with regard to your old - checkpoints containing such RNN cells, in which case you can use the - [checkpoint_convert script](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/rnn/python/tools/checkpoint_convert.py) - to convert the variable names in your old checkpoints. # Release 1.1.0 -- cgit v1.2.3