RNN cell to use for decoding.
Name prefix used for all created ops.
Scalar INT32
tensor representing the batch size of the input values.
Finalizes the output of the decoding process.
Finalizes the output of the decoding process.
Final output after decoding.
Final state after decoding.
Tensor containing the sequence lengths that the decoder cell outputs.
Finalized output and state to return from the decoding process.
This method is called before any decoding iterations.
This method is called before any decoding iterations. It computes the initial input values and the initial state.
Tuple containing: (i) a scalar BOOLEAN
tensor specifying whether initialization has finished,
(ii) the next input, and (iii) the initial decoder state.
This method is called once per step of decoding (but only once for dynamic decoding).
This method is called once per step of decoding (but only once for dynamic decoding).
Tuple containing: (i) the decoder output for this step, (ii) the next decoder state, (iii) the next input,
and (iv) a scalar BOOLEAN
tensor specifying whether decoding has finished.
RNN cell to use for decoding.
Performs dynamic decoding using this decoder.
Performs dynamic decoding using this decoder.
This method calls initialize()
once and next()
repeatedly.
Name prefix used for all created ops.
Describes whether the decoder keeps track of finished states.
Describes whether the decoder keeps track of finished states.
Most decoders will emit a true/false finished
value independently at each time step. In this case, the
dynamicDecode()
function keeps track of which batch entries have already finished, and performs a logical OR to
insert new batches to the finished set.
Some decoders, however, shuffle batches/beams between time steps and dynamicDecode()
will mix up the finished
state across these entries because it does not track the reshuffling across time steps. In this case, it is up to
the decoder to declare that it will keep track of its own finished state by setting this property to true
.
Recurrent Neural Network (RNN) decoder abstract interface.
Concepts used by this interface:
input
: (structure of) tensors and tensor arrays that is passed as input to the RNN cell composing the decoder, at each time step.state
: Sequence of tensors that is passed to the RNN cell instance as the state.finished
: Boolean tensor indicating whether each sequence in the batch has finished decoding.