Type Decoder
Namespace tensorflow.contrib.seq2seq
Parent PythonObjectContainer
Interfaces IDecoder
An RNN Decoder abstract interface object. Concepts used by this interface:
- `inputs`: (structure of) tensors and TensorArrays that is passed as input to
the RNNCell composing the decoder, at each time step.
- `state`: (structure of) tensors and TensorArrays that is passed to the
RNNCell instance as the state.
- `finished`: boolean tensor telling whether each sequence in the batch is
finished.
- `outputs`: Instance of BasicDecoderOutput. Result of the decoding, at each
time step.
Properties
Public properties
object batch_size get;
The batch size of input values.
object batch_size_dyn get;
The batch size of input values.
object output_dtype get;
A (possibly nested tuple of...) dtype[s].
object output_dtype_dyn get;
A (possibly nested tuple of...) dtype[s].
object output_size get;
A (possibly nested tuple of...) integer[s] or `TensorShape` object[s].
object output_size_dyn get;
A (possibly nested tuple of...) integer[s] or `TensorShape` object[s].
object PythonObject get;
bool tracks_own_finished get;
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 `dynamic_decode` function keeps track
of which batch entries are 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
`dynamic_decode` will mix up the finished state across these entries because
it does not track the reshuffle 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`.
object tracks_own_finished_dyn get;
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 `dynamic_decode` function keeps track
of which batch entries are 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
`dynamic_decode` will mix up the finished state across these entries because
it does not track the reshuffle 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`.