Type BasicDecoder
Namespace tensorflow.contrib.seq2seq
Parent Decoder
Interfaces IBasicDecoder
Basic sampling decoder.
Methods
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize
- finalize_dyn
- initialize
- step
- step
- step
- step
- step_dyn
Properties
Public instance methods
ValueTuple<object, object> finalize(FinalBeamSearchDecoderOutput outputs, BeamSearchDecoderState final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
FinalBeamSearchDecoderOutput
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
BeamSearchDecoderState
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(PythonClassContainer outputs, bool final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
PythonClassContainer
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
bool
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(PythonClassContainer outputs, bool final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
PythonClassContainer
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
bool
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(FinalBeamSearchDecoderOutput outputs, object final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
FinalBeamSearchDecoderOutput
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
object
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(FinalBeamSearchDecoderOutput outputs, object final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
FinalBeamSearchDecoderOutput
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
object
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(FinalBeamSearchDecoderOutput outputs, IGraphNodeBase final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
FinalBeamSearchDecoderOutput
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
IGraphNodeBase
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(FinalBeamSearchDecoderOutput outputs, IGraphNodeBase final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
FinalBeamSearchDecoderOutput
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
IGraphNodeBase
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(FinalBeamSearchDecoderOutput outputs, int final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
FinalBeamSearchDecoderOutput
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
int
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(FinalBeamSearchDecoderOutput outputs, int final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
FinalBeamSearchDecoderOutput
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
int
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(FinalBeamSearchDecoderOutput outputs, BeamSearchDecoderState final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
FinalBeamSearchDecoderOutput
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
BeamSearchDecoderState
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(PythonClassContainer outputs, object final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
PythonClassContainer
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
object
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(FinalBeamSearchDecoderOutput outputs, bool final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
FinalBeamSearchDecoderOutput
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
bool
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(FinalBeamSearchDecoderOutput outputs, bool final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
FinalBeamSearchDecoderOutput
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
bool
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(IEnumerable<object> outputs, object final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
IEnumerable<object>
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
object
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(IEnumerable<object> outputs, object final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
IEnumerable<object>
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
object
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(IEnumerable<object> outputs, IGraphNodeBase final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
IEnumerable<object>
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
IGraphNodeBase
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(IEnumerable<object> outputs, IGraphNodeBase final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
IEnumerable<object>
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
IGraphNodeBase
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(IEnumerable<object> outputs, int final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
IEnumerable<object>
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
int
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(IEnumerable<object> outputs, int final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
IEnumerable<object>
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
int
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(IEnumerable<object> outputs, BeamSearchDecoderState final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
IEnumerable<object>
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
BeamSearchDecoderState
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(IEnumerable<object> outputs, BeamSearchDecoderState final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
IEnumerable<object>
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
BeamSearchDecoderState
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(IEnumerable<object> outputs, bool final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
IEnumerable<object>
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
bool
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(IEnumerable<object> outputs, bool final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
IEnumerable<object>
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
bool
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(PythonClassContainer outputs, int final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
PythonClassContainer
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
int
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(PythonClassContainer outputs, int final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
PythonClassContainer
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
int
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(PythonClassContainer outputs, IGraphNodeBase final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
PythonClassContainer
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
IGraphNodeBase
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(PythonClassContainer outputs, IGraphNodeBase final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
PythonClassContainer
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
IGraphNodeBase
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(PythonClassContainer outputs, object final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
PythonClassContainer
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
object
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(PythonClassContainer outputs, BeamSearchDecoderState final_state, int sequence_lengths)
Called after decoding iterations complete.
Parameters
-
PythonClassContainer
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
BeamSearchDecoderState
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
int
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
ValueTuple<object, object> finalize(PythonClassContainer outputs, BeamSearchDecoderState final_state, IGraphNodeBase sequence_lengths)
Called after decoding iterations complete.
Parameters
-
PythonClassContainer
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
BeamSearchDecoderState
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBase
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
ValueTuple<object, object>
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
object finalize_dyn(object outputs, object final_state, object sequence_lengths)
Called after decoding iterations complete.
Parameters
-
object
outputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
object
final_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
object
sequence_lengths - 1-D `int32` tensor containing lengths of each sequence.
Returns
-
object
- `(final_outputs, final_state)`: `final_outputs` is an object containing the final decoder output, `final_state` is a (structure of) state tensors and TensorArrays.
object initialize(string name)
Initialize the decoder.
Parameters
-
string
name - Name scope for any created operations.
Returns
-
object
- `(finished, first_inputs, initial_state)`.
object step(IGraphNodeBase time, object inputs, object state, string name)
Perform a decoding step.
Parameters
-
IGraphNodeBase
time - scalar `int32` tensor.
-
object
inputs - A (structure of) input tensors.
-
object
state - A (structure of) state tensors and TensorArrays.
-
string
name - Name scope for any created operations.
Returns
-
object
- `(outputs, next_state, next_inputs, finished)`.
object step(IGraphNodeBase time, object inputs, BeamSearchDecoderState state, string name)
Perform a decoding step.
Parameters
-
IGraphNodeBase
time - scalar `int32` tensor.
-
object
inputs - A (structure of) input tensors.
-
BeamSearchDecoderState
state - A (structure of) state tensors and TensorArrays.
-
string
name - Name scope for any created operations.
Returns
-
object
- `(outputs, next_state, next_inputs, finished)`.
object step(IGraphNodeBase time, BeamSearchDecoderState inputs, object state, string name)
Perform a decoding step.
Parameters
-
IGraphNodeBase
time - scalar `int32` tensor.
-
BeamSearchDecoderState
inputs - A (structure of) input tensors.
-
object
state - A (structure of) state tensors and TensorArrays.
-
string
name - Name scope for any created operations.
Returns
-
object
- `(outputs, next_state, next_inputs, finished)`.
object step(IGraphNodeBase time, BeamSearchDecoderState inputs, BeamSearchDecoderState state, string name)
Perform a decoding step.
Parameters
-
IGraphNodeBase
time - scalar `int32` tensor.
-
BeamSearchDecoderState
inputs - A (structure of) input tensors.
-
BeamSearchDecoderState
state - A (structure of) state tensors and TensorArrays.
-
string
name - Name scope for any created operations.
Returns
-
object
- `(outputs, next_state, next_inputs, finished)`.
object step_dyn(object time, object inputs, object state, object name)
Perform a decoding step.
Parameters
-
object
time - scalar `int32` tensor.
-
object
inputs - A (structure of) input tensors.
-
object
state - A (structure of) state tensors and TensorArrays.
-
object
name - Name scope for any created operations.
Returns
-
object
- `(outputs, next_state, next_inputs, finished)`.
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].