(self, batch_size)
return [read_weightings, write_weighting, usage_vector, precedence_weighting, m, link_matrix, read_vectors]
Returns the memory state for step 0. Used in DNC for the argument to tf.while_loop
        
        :return:
Returns the memory state for step 0. Used in DNC for the argument to tf.while_loop
        
        :return:
Returns the memory state for step 0 . Used in DNC for the argument to tf . while_loop : return :
def init_memory(self, batch_size):
        """
        Returns the memory state for step 0. Used in DNC for the argument to tf.while_loop
        
        :return: 
        """
        read_weightings = tf.fill([batch_size, self.memory_size, self.num_read_heads], Memory.epsilon)
        write_weighting = tf.fill([batch_size, self.memory_size], Memory.epsilon, name="Write_weighting")
        precedence_weighting = tf.zeros([batch_size, self.memory_size], name="Precedence_weighting")
        m = tf.fill([batch_size, self.memory_size, self.word_size], Memory.epsilon)  # initial memory matrix
        usage_vector = tf.zeros([batch_size, self.memory_size], name="Usage_vector")
        link_matrix = tf.zeros([batch_size, self.memory_size, self.memory_size])
        read_vectors = tf.fill([batch_size, self.num_read_heads, self.word_size], Memory.epsilon)

        return [read_weightings, write_weighting, usage_vector, precedence_weighting, m, link_matrix, read_vectors]
def init_memory ( self , batch_size ) : read_weightings = tf . fill ( [ batch_size , self . memory_size , self . num_read_heads ] , Memory . epsilon ) write_weighting = tf . fill ( [ batch_size , self . memory_size ] , Memory . epsilon , name = "Write_weighting" ) precedence_weighting = tf . zeros ( [ batch_size , self . memory_size ] , name = "Precedence_weighting" ) m = tf . fill ( [ batch_size , self . memory_size , self . word_size ] , Memory . epsilon ) # initial memory matrix usage_vector = tf . zeros ( [ batch_size , self . memory_size ] , name = "Usage_vector" ) link_matrix = tf . zeros ( [ batch_size , self . memory_size , self . memory_size ] ) read_vectors = tf . fill ( [ batch_size , self . num_read_heads , self . word_size ] , Memory . epsilon ) return [ read_weightings , write_weighting , usage_vector , precedence_weighting , m , link_matrix , read_vectors ]