(self, z, helper, input_shape, max_length=None)
return results
Decodes the given batch of latent vectors vectors, which may be 0-length.

    Args:
      z: Batch of latent vectors, sized `[batch_size, z_size]`, where `z_size`
        may be 0 for unconditioned decoding.
      helper: A seq2seq.Helper to use.
      input_shape: The shape of each model input vector passed to the decoder.
      max_length: (Optional) The maximum iterations to decode.

    Returns:
      results: The LstmDecodeResults.
Decodes the given batch of latent vectors vectors, which may be 0-length.
Decodes the given batch of latent vectors vectors which may be 0 - length .
def _decode(self, z, helper, input_shape, max_length=None):
    """Decodes the given batch of latent vectors vectors, which may be 0-length.

    Args:
      z: Batch of latent vectors, sized `[batch_size, z_size]`, where `z_size`
        may be 0 for unconditioned decoding.
      helper: A seq2seq.Helper to use.
      input_shape: The shape of each model input vector passed to the decoder.
      max_length: (Optional) The maximum iterations to decode.

    Returns:
      results: The LstmDecodeResults.
    """
    initial_state = lstm_utils.initial_cell_state_from_embedding(
        self._dec_cell, z, name='decoder/z_to_initial_state')

    decoder = lstm_utils.Seq2SeqLstmDecoder(
        self._dec_cell,
        helper,
        initial_state=initial_state,
        input_shape=input_shape,
        output_layer=self._output_layer)
    final_output, final_state, final_lengths = contrib_seq2seq.dynamic_decode(
        decoder,
        maximum_iterations=max_length,
        swap_memory=True,
        scope='decoder')
    results = lstm_utils.LstmDecodeResults(
        rnn_input=final_output.rnn_input[:, :, :self._output_depth],
        rnn_output=final_output.rnn_output,
        samples=final_output.sample_id,
        final_state=final_state,
        final_sequence_lengths=final_lengths)

    return results
def _decode ( self , z , helper , input_shape , max_length = None ) : initial_state = lstm_utils . initial_cell_state_from_embedding ( self . _dec_cell , z , name = 'decoder/z_to_initial_state' ) decoder = lstm_utils . Seq2SeqLstmDecoder ( self . _dec_cell , helper , initial_state = initial_state , input_shape = input_shape , output_layer = self . _output_layer ) final_output , final_state , final_lengths = contrib_seq2seq . dynamic_decode ( decoder , maximum_iterations = max_length , swap_memory = True , scope = 'decoder' ) results = lstm_utils . LstmDecodeResults ( rnn_input = final_output . rnn_input [ : , : , : self . _output_depth ] , rnn_output = final_output . rnn_output , samples = final_output . sample_id , final_state = final_state , final_sequence_lengths = final_lengths ) return results