docstr: Test a few of the important output shapes for NeuralStackModel.
      
docstr_tok: ["Test","a","few","of","the","important","output","shapes","for","NeuralStackModel","."]
code: def test_model_shapes(self):
      """Test a few of the important output shapes for NeuralStackModel."""
      batch_size = 100
      seq_length = 80
      embedding_size = 64
      vocab_size = 128
  
      hparams = neural_stack.neural_stack()
      problem_hparams = contrib.training().HParams()
  
      problem_hparams.add_hparam(
          "modality",
          {
              "inputs": modalities.ModalityType.SYMBOL,
              "targets": modalities.ModalityType.SYMBOL,
          },
      )
      problem_hparams.add_hparam(
          "vocab_size",
          {
              "inputs": vocab_size,
              "targets": vocab_size,
          },
      )
      model = neural_stack.NeuralStackModel(
          hparams, problem_hparams=problem_hparams
      )
  
      features = {
          "inputs": tf.ones(
              [batch_size, seq_length, 1, 1], dtype=tf.int32
          ),
          "targets": tf.ones(
              [batch_size, seq_length, 1, 1], dtype=tf.int32
          ),
      }
  
      transformed_features = model.bottom(features)
  
      self.assertEqual(
          [batch_size, seq_length, 1, embedding_size],
          transformed_features["inputs"].shape,
      )
  
      logits = model.body(transformed_features)
  
      self.assertEqual(
          [batch_size, seq_length, 1, embedding_size], logits.shape
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import mock
  import numpy
  from tensor2tensor.layers import modalities
  from tensor2tensor.models.research import neural_stack
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the NeuralStackModelTest obj's underlying member method code with example usage: obj.test_model_shapes() without return types