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
-
FinalBeamSearchDecoderOutputoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
BeamSearchDecoderStatefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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
-
PythonClassContaineroutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
boolfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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
-
PythonClassContaineroutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
boolfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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
-
FinalBeamSearchDecoderOutputoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
objectfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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
-
FinalBeamSearchDecoderOutputoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
objectfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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
-
FinalBeamSearchDecoderOutputoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
IGraphNodeBasefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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
-
FinalBeamSearchDecoderOutputoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
IGraphNodeBasefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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
-
FinalBeamSearchDecoderOutputoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
intfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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
-
FinalBeamSearchDecoderOutputoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
intfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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
-
FinalBeamSearchDecoderOutputoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
BeamSearchDecoderStatefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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
-
PythonClassContaineroutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
objectfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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
-
FinalBeamSearchDecoderOutputoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
boolfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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
-
FinalBeamSearchDecoderOutputoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
boolfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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.
-
objectfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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.
-
objectfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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.
-
IGraphNodeBasefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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.
-
IGraphNodeBasefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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.
-
intfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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.
-
intfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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.
-
BeamSearchDecoderStatefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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.
-
BeamSearchDecoderStatefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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.
-
boolfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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.
-
boolfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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
-
PythonClassContaineroutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
intfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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
-
PythonClassContaineroutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
intfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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
-
PythonClassContaineroutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
IGraphNodeBasefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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
-
PythonClassContaineroutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
IGraphNodeBasefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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
-
PythonClassContaineroutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
objectfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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
-
PythonClassContaineroutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
BeamSearchDecoderStatefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
intsequence_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
-
PythonClassContaineroutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
BeamSearchDecoderStatefinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
IGraphNodeBasesequence_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
-
objectoutputs - RNNCell outputs (possibly nested tuple of) tensor[s] for all time steps.
-
objectfinal_state - RNNCell final state (possibly nested tuple of) tensor[s] for last time step.
-
objectsequence_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
-
stringname - 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
-
IGraphNodeBasetime - scalar `int32` tensor.
-
objectinputs - A (structure of) input tensors.
-
objectstate - A (structure of) state tensors and TensorArrays.
-
stringname - 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
-
IGraphNodeBasetime - scalar `int32` tensor.
-
objectinputs - A (structure of) input tensors.
-
BeamSearchDecoderStatestate - A (structure of) state tensors and TensorArrays.
-
stringname - 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
-
IGraphNodeBasetime - scalar `int32` tensor.
-
BeamSearchDecoderStateinputs - A (structure of) input tensors.
-
objectstate - A (structure of) state tensors and TensorArrays.
-
stringname - 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
-
IGraphNodeBasetime - scalar `int32` tensor.
-
BeamSearchDecoderStateinputs - A (structure of) input tensors.
-
BeamSearchDecoderStatestate - A (structure of) state tensors and TensorArrays.
-
stringname - 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
-
objecttime - scalar `int32` tensor.
-
objectinputs - A (structure of) input tensors.
-
objectstate - A (structure of) state tensors and TensorArrays.
-
objectname - 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].