class_docstr: An RNN cell base class that can implement a stack or queue.
    
class_docstr_tok: ["An","RNN","cell","base","class","that","can","implement","a","stack","or","queue","."]
docstr: Define the output shapes of the neural stack controller.
  
  Making this a separate functions so that it can be used in unit tests.
  
  Args:
    batch_size: The size of the current batch of data.
  
  Returns:
    A tuple of shapes for each output returned from the controller.
docstr_tok: ["Define","the","output","shapes","of","the","neural","stack","controller",".","Making","this","a","separate","functions","so","that","it","can","be","used","in","unit","tests",".","Args",":","batch_size",":","The","size","of","the","current","batch","of","data",".","Returns",":","A","tuple","of","shapes","for","each","output","returned","from","the","controller","."]
code: def get_controller_shape(self, batch_size):
      """Define the output shapes of the neural stack controller.
  
      Making this a separate functions so that it can be used in unit tests.
  
      Args:
        batch_size: The size of the current batch of data.
  
      Returns:
        A tuple of shapes for each output returned from the controller.
      """
      return (
          # push_strengths,
          [batch_size, self._num_write_heads, 1, 1],
          # pop_strengths
          [batch_size, self._num_write_heads, 1, 1],
          # write_values
          [batch_size, self._num_write_heads, self._embedding_size],
          # outputs
          [batch_size, 1, self._embedding_size],
          # state
          [batch_size, self._num_units],
      )
  
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 12 for calling the NeuralStackCell obj's underlying member method code with example usage: obj.get_controller_shape(batch_size) and returns: list,  list,  list,  list,  list