class_docstr: Sequence-to-sequence base class.
class_docstr_tok: ["Sequence-to-sequence","base","class","."]
docstr: Decode a batch.
  
  Args:
    sess: tensorflow session to use.
  
  Returns:
    A tuple consiting of outputs, infer_summary.
      outputs: of size [batch_size, time]
docstr_tok: ["Decode","a","batch",".","Args",":","sess",":","tensorflow","session","to","use",".","Returns",":","A","tuple","consiting","of","outputs",",","infer_summary",".","outputs",":","of","size","[","batch_size",",","time","]"]
code: def decode(self, sess):
      """Decode a batch.
  
      Args:
        sess: tensorflow session to use.
  
      Returns:
        A tuple consiting of outputs, infer_summary.
          outputs: of size [batch_size, time]
      """
      output_tuple = self.infer(sess)
      sample_words = output_tuple.sample_words
      infer_summary = output_tuple.infer_summary
  
      # make sure outputs is of shape [batch_size, time] or [beam_width,
      # batch_size, time] when using beam search.
      if self.time_major:
          sample_words = sample_words.transpose()
      elif sample_words.ndim == 3:
          # beam search output in [batch_size, time, beam_width] shape.
          sample_words = sample_words.transpose([2, 0, 1])
      return sample_words, infer_summary
  
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 22 for calling the BaseModel obj's underlying member method code with example usage: obj.decode(sess) and returns: sample_words,  infer_summary