class_docstr: Sequence-to-sequence base class.
class_docstr_tok: ["Sequence-to-sequence","base","class","."]
docstr: Execute train graph.
docstr_tok: ["Execute","train","graph","."]
code: def train(self, sess):
      """Execute train graph."""
      assert self.mode == tf.contrib.learn.ModeKeys.TRAIN
      output_tuple = TrainOutputTuple(
          train_summary=self.train_summary,
          train_loss=self.train_loss,
          predict_count=self.predict_count,
          global_step=self.global_step,
          word_count=self.word_count,
          batch_size=self.batch_size,
          grad_norm=self.grad_norm,
          learning_rate=self.learning_rate,
          mask_update_op=self.mask_update_op,
          pruning_summary=self.pruning_summary,
      )
      return sess.run([self.update, output_tuple])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import collections
  import tensorflow
  from tensorflow.contrib.model_pruning import get_masks, get_thresholds
  from tensorflow.contrib.model_pruning.python import pruning
  from tensorflow.contrib.model_pruning.python.layers import core_layers
  from .None import model_helper
  from .utils import misc_utils, iterator_utils
label_desc: Use image node_id 9 for calling the BaseModel obj's underlying member method code with example usage: obj.train(sess) and returns: sess