class_docstr: An encoder-decoder T2TModel that uses NeuralStackCells.
    
class_docstr_tok: ["An","encoder-decoder","T2TModel","that","uses","NeuralStackCells","."]
docstr: Build the main body of the model.
  
  Args:
    features: A dict of "inputs" and "targets" which have already been passed
      through an embedding layer. Inputs should have shape
      [batch_size, max_seq_length, 1, embedding_size]. Targets should have
      shape [batch_size, max_seq_length, 1, 1]
  
  Returns:
    The logits which get passed to the top of the model for inference.
    A tensor of shape [batch_size, seq_length, 1, embedding_size]
docstr_tok: ["Build","the","main","body","of","the","model",".","Args",":","features",":","A","dict","of","``","inputs","''","and","``","targets","''","which","have","already","been","passed","through","an","embedding","layer",".","Inputs","should","have","shape","[","batch_size",",","max_seq_length",",","1",",","embedding_size","]",".","Targets","should","have","shape","[","batch_size",",","max_seq_length",",","1",",","1","]","Returns",":","The","logits","which","get","passed","to","the","top","of","the","model","for","inference",".","A","tensor","of","shape","[","batch_size",",","seq_length",",","1",",","embedding_size","]"]
code: def body(self, features):
      """Build the main body of the model.
  
      Args:
        features: A dict of "inputs" and "targets" which have already been passed
          through an embedding layer. Inputs should have shape
          [batch_size, max_seq_length, 1, embedding_size]. Targets should have
          shape [batch_size, max_seq_length, 1, 1]
  
      Returns:
        The logits which get passed to the top of the model for inference.
        A tensor of shape [batch_size, seq_length, 1, embedding_size]
      """
      inputs = features.get("inputs")
      targets = features["targets"]
  
      if inputs is not None:
          inputs = common_layers.flatten4d3d(inputs)
          _, final_encoder_state = self._rnn(
              tf.reverse(inputs, axis=[1]), "encoder"
          )
      else:
          final_encoder_state = None
  
      shifted_targets = common_layers.shift_right(targets)
      decoder_outputs, _ = self._rnn(
          common_layers.flatten4d3d(shifted_targets),
          "decoder",
          initial_state=final_encoder_state,
      )
      return decoder_outputs
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling the NeuralStackModel obj's underlying member method code with example usage: obj.body(features) and returns: decoder_outputs