def next_batch_valid(self):
    '\n        Read a batch randomly for validation during training\n        :x_batch: <batch size x seq_length x input_dim>\n        :y_batch: <batch size x seq_length x input_dim>\n        :d_batch: <batch size x seq_length>\n        '
    x_batch = []
    y_batch = []
    sg_batch = []
    map_batch = []
    d_batch = []
    counter = 0
    while (len(x_batch) < self.batch_size):
        data = self.valid_data[self.pointer]
        if (self.frame_pointer < ((len(data) - self.seq_length) - 1)):
            idx = self.frame_pointer
            seq_all = np.copy(data[idx:((idx + self.seq_length) + 2)])
            (seq_all_proc, seq_sgrid, seq_map) = self.preprocess_sequence(seq_all, isValid=True, isDiff=True)
            seq_x = np.copy(seq_all_proc[0:self.seq_length])
            seq_y = np.copy(seq_all_proc[1:(self.seq_length + 1)])
            seq_sgrid_x = np.copy(seq_sgrid[0:self.seq_length, :])
            y_batch.append(seq_y)
            x_batch.append(seq_x)
            sg_batch.append(seq_sgrid_x)
            map_batch.append(seq_map[0:self.seq_length])
            d_batch.append([self.pointer, idx])
            self.frame_pointer += int((self.seq_length / 4))
        elif (self.pointer >= (len(self.valid_data) - 1)):
            x_batch = []
            y_batch = []
            sg_batch = []
            d_batch = []
            return (x_batch, y_batch, sg_batch, map_batch, d_batch)
        else:
            self.pointer += 1
            self.frame_pointer = 0
        counter += 1
    return (x_batch, y_batch, sg_batch, map_batch, d_batch)
Read a batch randomly for validation during training
:x_batch: <batch size x seq_length x input_dim>
:y_batch: <batch size x seq_length x input_dim>
:d_batch: <batch size x seq_length>
def next_batch_valid(self):
    '\n        Read a batch randomly for validation during training\n        :x_batch: <batch size x seq_length x input_dim>\n        :y_batch: <batch size x seq_length x input_dim>\n        :d_batch: <batch size x seq_length>\n        '
    x_batch = []
    y_batch = []
    sg_batch = []
    map_batch = []
    d_batch = []
    counter = 0
    while (len(x_batch) < self.batch_size):
        data = self.valid_data[self.pointer]
        if (self.frame_pointer < ((len(data) - self.seq_length) - 1)):
            idx = self.frame_pointer
            seq_all = np.copy(data[idx:((idx + self.seq_length) + 2)])
            (seq_all_proc, seq_sgrid, seq_map) = self.preprocess_sequence(seq_all, isValid=True, isDiff=True)
            seq_x = np.copy(seq_all_proc[0:self.seq_length])
            seq_y = np.copy(seq_all_proc[1:(self.seq_length + 1)])
            seq_sgrid_x = np.copy(seq_sgrid[0:self.seq_length, :])
            y_batch.append(seq_y)
            x_batch.append(seq_x)
            sg_batch.append(seq_sgrid_x)
            map_batch.append(seq_map[0:self.seq_length])
            d_batch.append([self.pointer, idx])
            self.frame_pointer += int((self.seq_length / 4))
        elif (self.pointer >= (len(self.valid_data) - 1)):
            x_batch = []
            y_batch = []
            sg_batch = []
            d_batch = []
            return (x_batch, y_batch, sg_batch, map_batch, d_batch)
        else:
            self.pointer += 1
            self.frame_pointer = 0
        counter += 1
    return (x_batch, y_batch, sg_batch, map_batch, d_batch)