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: Create the RNN and output projections for controlling the stack.
      
docstr_tok: ["Create","the","RNN","and","output","projections","for","controlling","the","stack","."]
code: def build_controller(self):
      """Create the RNN and output projections for controlling the stack."""
      with tf.name_scope("controller"):
          self.rnn = contrib.rnn().BasicRNNCell(self._num_units)
          self._input_proj = self.add_variable(
              "input_projection_weights",
              shape=[
                  self._embedding_size * (self._num_read_heads + 1),
                  self._num_units,
              ],
              dtype=self.dtype,
          )
          self._input_bias = self.add_variable(
              "input_projection_bias",
              shape=[self._num_units],
              initializer=tf.zeros_initializer(dtype=self.dtype),
          )
          self._push_proj, self._push_bias = self.add_scalar_projection(
              "push", self._num_write_heads
          )
          self._pop_proj, self._pop_bias = self.add_scalar_projection(
              "pop", self._num_write_heads
          )
          (
              self._value_proj,
              self._value_bias,
          ) = self.add_vector_projection("value", self._num_write_heads)
          (
              self._output_proj,
              self._output_bias,
          ) = self.add_vector_projection("output", 1)
  
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 10 for calling the NeuralStackCell obj's underlying member method code with example usage: obj.build_controller() without return types