tf.contrib.legacy_seq2seq.basic_rnn_seq2seq
Basic RNN sequence-to-sequence model.
tf.contrib.legacy_seq2seq.basic_rnn_seq2seq(
encoder_inputs, decoder_inputs, cell, dtype=tf.dtypes.float32, scope=None
)
This model first runs an RNN to encode encoder_inputs into a state vector,
then runs decoder, initialized with the last encoder state, on decoder_inputs.
Encoder and decoder use the same RNN cell type, but don't share parameters.
Args |
encoder_inputs
|
A list of 2D Tensors [batch_size x input_size].
|
decoder_inputs
|
A list of 2D Tensors [batch_size x input_size].
|
cell
|
tf.compat.v1.nn.rnn_cell.RNNCell defining the cell function and size.
|
dtype
|
The dtype of the initial state of the RNN cell (default: tf.float32).
|
scope
|
VariableScope for the created subgraph; default: "basic_rnn_seq2seq".
|
Returns |
A tuple of the form (outputs, state), where:
outputs: A list of the same length as decoder_inputs of 2D Tensors with
shape [batch_size x output_size] containing the generated outputs.
state: The state of each decoder cell in the final time-step.
It is a 2D Tensor of shape [batch_size x cell.state_size].
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[]]