(batch_size, vector_size, min_s, max_s)
return np.array([inp_sequence, out_sequence]), total_length
:param batch_size:
        :param vector_size:
        :param min_s:
        :param max_s:
        :return: np array of shape [batch_size, vector_size, total_length]
def generate_copy_pair(batch_size, vector_size, min_s, max_s):
        """

        :param batch_size:
        :param vector_size:
        :param min_s:
        :param max_s:
        :return: np array of shape [batch_size, vector_size, total_length]
        """
        sequence_length = np.random.randint(min_s, max_s + 1)
        total_length = 2 * sequence_length + 2

        shape = (batch_size, total_length, vector_size)
        inp_sequence = np.zeros(shape, dtype=np.float32)
        out_sequence = np.zeros(shape, dtype=np.float32)

        for i in range(batch_size):
            ones = np.random.binomial(1, 0.5, (1, sequence_length, vector_size - 1))

            inp_sequence[i, :sequence_length, :-1] = ones
            out_sequence[i, sequence_length + 1:2 * sequence_length + 1, :-1] = ones

            inp_sequence[i, sequence_length, -1] = 1  # adding the marker, so the network knows when to start copying

        return np.array([inp_sequence, out_sequence]), total_length
def generate_copy_pair ( batch_size , vector_size , min_s , max_s ) : sequence_length = np . random . randint ( min_s , max_s + 1 ) total_length = 2 * sequence_length + 2 shape = ( batch_size , total_length , vector_size ) inp_sequence = np . zeros ( shape , dtype = np . float32 ) out_sequence = np . zeros ( shape , dtype = np . float32 ) for i in range ( batch_size ) : ones = np . random . binomial ( 1 , 0.5 , ( 1 , sequence_length , vector_size - 1 ) ) inp_sequence [ i , : sequence_length , : - 1 ] = ones out_sequence [ i , sequence_length + 1 : 2 * sequence_length + 1 , : - 1 ] = ones inp_sequence [ i , sequence_length , - 1 ] = 1 # adding the marker, so the network knows when to start copying return np . array ( [ inp_sequence , out_sequence ] ) , total_length