class_docstr: The basic seq2seq model (without attention).
  
  Example:
  
      .. code-block:: python
  
          model = BasicSeq2seq(data_hparams, model_hparams)
          exor = tx.run.Executor(
              model=model,
              data_hparams=data_hparams,
              config=run_config)
          exor.train_and_evaluate(
              max_train_steps=10000,
              eval_steps=100)
  
  .. document private functions
  .. automethod:: _build
class_docstr_tok: ["The","basic","seq2seq","model","(","without","attention",")",".","Example",":","..","code-block",":",":","python","model","=","BasicSeq2seq","(","data_hparams",",","model_hparams",")","exor","=","tx.run.Executor","(","model=model",",","data_hparams=data_hparams",",","config=run_config",")","exor.train_and_evaluate","(","max_train_steps=10000",",","eval_steps=100",")","..","document","private","functions","..","automethod",":",":","_build"]
docstr: Decodes.
          
docstr_tok: ["Decodes","."]
code: def decode(self, encoder_results, features, labels, mode):
      """Decodes."""
      initial_state = self._connect(
          encoder_results, features, labels, mode
      )
  
      if mode == tf.estimator.ModeKeys.PREDICT:
          outputs, final_state, sequence_length = self._decode_infer(
              initial_state, encoder_results, features, labels, mode
          )
      else:
          outputs, final_state, sequence_length = self._decode_train(
              initial_state, encoder_results, features, labels, mode
          )
  
      return {
          "outputs": outputs,
          "final_state": final_state,
          "sequence_length": sequence_length,
      }
  
file_path: texar/texar/tf/models/seq2seq/basic_seq2seq.py
imports: import tensorflow
  from texar.tf.models.seq2seq.seq2seq_base import Seq2seqBase
  from texar.tf.modules.decoders.beam_search_decode import beam_search_decode
  from texar.tf.utils import utils
  from texar.tf.utils.shapes import get_batch_size
label_desc: Use image node_id 11 for calling the BasicSeq2seq obj's underlying member method code with example usage: obj.decode(encoder_results, features, labels, mode) and returns: dict