class_docstr: Base class inherited by all seq2seq model classes.
  
  .. document private functions
  .. automethod:: _build
class_docstr_tok: ["Base","class","inherited","by","all","seq2seq","model","classes",".","..","document","private","functions","..","automethod",":",":","_build"]
code: def _build(self, features, labels, params, mode, config=None):
      self._build_vocab()
      self._build_embedders()
      self._build_encoder()
      self._build_decoder()
      self._build_connector()
  
      encoder_results = self.encode(features, labels, mode)
      decoder_results = self.decode(
          encoder_results, features, labels, mode
      )
  
      loss, train_op, preds, eval_metric_ops = None, None, None, None
      if mode == tf.estimator.ModeKeys.PREDICT:
          preds = self._get_predictions(
              decoder_results, features, labels
          )
      else:
          loss = self.get_loss(decoder_results, features, labels)
  
          if mode == tf.estimator.ModeKeys.TRAIN:
              train_op = self._get_train_op(loss)
          if mode == tf.estimator.ModeKeys.EVAL:
              eval_metric_ops = self._get_eval_metric_ops(
                  decoder_results, features, labels
              )
  
          preds = self._get_predictions(
              decoder_results, features, labels, loss
          )
  
      return tf.estimator.EstimatorSpec(
          mode=mode,
          predictions=preds,
          loss=loss,
          train_op=train_op,
          eval_metric_ops=eval_metric_ops,
      )
  
imports: import tensorflow
  from texar.tf.models.model_base import ModelBase
  from texar.tf.losses.mle_losses import sequence_sparse_softmax_cross_entropy
  from texar.tf.data.data.paired_text_data import PairedTextData
  from texar.tf.core.optimization import get_train_op
  from texar.tf.hyperparams import HParams
  from texar.tf.utils import utils
  from texar.tf.utils.variables import collect_trainable_variables
label_desc: Use image node_id 17 for calling the Seq2seqBase obj's underlying member method code with example usage: obj._build(features, labels, params, mode, config) and returns: tf