'Creates a new tensor array to store this layer\'s activations.
Arguments:
stride: Possibly dynamic batch * beam size with which to initialize the
tensor array
Returns:
TensorArray object'

def create_array(self, stride):

    check.Gt(self.dim, 0, 'Cannot    create    array    when    dimension    is    dynamic')
    tensor_array = ta.TensorArray(dtype=tf.float32, size=0, dynamic_size=True, clear_after_read=False, infer_shape=False, name=('%s_array' % self.name))
    initial_value = tf.zeros([stride, self.dim])
    return tensor_array.write(0, initial_value)
