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: A helper function for mapping scalar controller outputs.
  
  Args:
    name: A prefix for the variable names.
    size: The desired number of scalar outputs.
  
  Returns:
    A tuple of (weights, bias) where weights has shape [num_units, size] and
    bias has shape [size].
docstr_tok: ["A","helper","function","for","mapping","scalar","controller","outputs",".","Args",":","name",":","A","prefix","for","the","variable","names",".","size",":","The","desired","number","of","scalar","outputs",".","Returns",":","A","tuple","of","(","weights",",","bias",")","where","weights","has","shape","[","num_units",",","size","]","and","bias","has","shape","[","size","]","."]
code: def add_scalar_projection(self, name, size):
      """A helper function for mapping scalar controller outputs.
  
      Args:
        name: A prefix for the variable names.
        size: The desired number of scalar outputs.
  
      Returns:
        A tuple of (weights, bias) where weights has shape [num_units, size] and
        bias has shape [size].
      """
      weights = self.add_variable(
          name + "_projection_weights",
          shape=[self._num_units, size],
          dtype=self.dtype,
      )
      bias = self.add_variable(
          name + "_projection_bias",
          shape=[size],
          initializer=tf.zeros_initializer(dtype=self.dtype),
      )
      return weights, bias
  
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 8 for calling the NeuralStackCell obj's underlying member method code with example usage: obj.add_scalar_projection(name, size) and returns: weights,  bias