diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-03-21 09:05:47 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-03-21 10:26:23 -0700 |
commit | d5a80fe3c6a2c144064c54d5c5380d54522d662e (patch) | |
tree | d575f1087e1b8536bf6e6db6c8c36f680d52b2ec | |
parent | 5e49cf8685f798432ba7843c2be73e133cdca28b (diff) |
Update `stack_bidirectional_dynamic_rnn` and `bidirectional_dynamic_rnn` `inputs` argument's documentation.
Change: 150766149
-rw-r--r-- | tensorflow/contrib/rnn/python/ops/rnn.py | 6 | ||||
-rw-r--r-- | tensorflow/python/ops/rnn.py | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/tensorflow/contrib/rnn/python/ops/rnn.py b/tensorflow/contrib/rnn/python/ops/rnn.py index 162b6aa0fd..1757a2148c 100644 --- a/tensorflow/contrib/rnn/python/ops/rnn.py +++ b/tensorflow/contrib/rnn/python/ops/rnn.py @@ -144,8 +144,8 @@ def stack_bidirectional_dynamic_rnn(cells_fw, to be used for forward direction. cells_bw: List of instances of RNNCell, one per layer, to be used for backward direction. - inputs: A length T list of inputs, each a tensor of shape - [batch_size, input_size], or a nested tuple of such elements. + inputs: The RNN inputs. this must be a tensor of shape: + `[batch_size, max_time, ...]`, or a nested tuple of such elements. initial_states_fw: (optional) A list of the initial states (one per layer) for the forward RNN. Each tensor must has an appropriate type and shape @@ -175,7 +175,7 @@ def stack_bidirectional_dynamic_rnn(cells_fw, Raises: TypeError: If `cell_fw` or `cell_bw` is not an instance of `RNNCell`. - ValueError: If inputs is `None`, not a list or an empty list. + ValueError: If inputs is `None`. """ if not cells_fw: raise ValueError("Must specify at least one fw cell for BidirectionalRNN.") diff --git a/tensorflow/python/ops/rnn.py b/tensorflow/python/ops/rnn.py index a83fb9fb48..680da9b49b 100644 --- a/tensorflow/python/ops/rnn.py +++ b/tensorflow/python/ops/rnn.py @@ -271,10 +271,9 @@ def bidirectional_dynamic_rnn(cell_fw, cell_bw, inputs, sequence_length=None, cell_bw: An instance of RNNCell, to be used for backward direction. inputs: The RNN inputs. If time_major == False (default), this must be a tensor of shape: - `[batch_size, max_time, input_size]`. + `[batch_size, max_time, ...]`, or a nested tuple of such elements. If time_major == True, this must be a tensor of shape: - `[max_time, batch_size, input_size]`. - [batch_size, input_size]. + `[max_time, batch_size, ...]`, or a nested tuple of such elements. sequence_length: (optional) An int32/int64 vector, size `[batch_size]`, containing the actual lengths for each of the sequences in the batch. If not provided, all batch entries are assumed to be full sequences; and |