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: Initialize write strengths to write to the first memory address.
  
  This is exposed as its own function so that it can be overridden to provide
  alternate write adressing schemes.
  
  Args:
    batch_size: The size of the current batch.
  
  Returns:
    A tf.float32 tensor of shape [num_write_heads, memory_size, 1] where the
    first element in the second dimension is set to 1.0.
docstr_tok: ["Initialize","write","strengths","to","write","to","the","first","memory","address",".","This","is","exposed","as","its","own","function","so","that","it","can","be","overridden","to","provide","alternate","write","adressing","schemes",".","Args",":","batch_size",":","The","size","of","the","current","batch",".","Returns",":","A","tf.float32","tensor","of","shape","[","num_write_heads",",","memory_size",",","1","]","where","the","first","element","in","the","second","dimension","is","set","to","1.0","."]
code: def initialize_write_strengths(self, batch_size):
      """Initialize write strengths to write to the first memory address.
  
      This is exposed as its own function so that it can be overridden to provide
      alternate write adressing schemes.
  
      Args:
        batch_size: The size of the current batch.
  
      Returns:
        A tf.float32 tensor of shape [num_write_heads, memory_size, 1] where the
        first element in the second dimension is set to 1.0.
      """
      return tf.expand_dims(
          tf.one_hot(
              [[0] * self._num_write_heads] * batch_size,
              depth=self._memory_size,
              dtype=tf.float32,
          ),
          axis=3,
      )
  
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 4 for calling the NeuralStackCell obj's underlying member method code with example usage: obj.initialize_write_strengths(batch_size) and returns: tf