def next_sequence_valid(self):
    '\n\n        dataset id (0)\n        object id (1)\n        target pose (2~3)\n        neighbor pose (4~63)\n\n        Read a batch randomly for validation and visualization\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        '
    NotEndOfData = True
    while NotEndOfData:
        if (self.pointer >= len(self.valid_data)):
            x = []
            grid = []
            map = []
            x_max = []
            y_max = []
            scale = []
            dataset_index = []
            NotEndOfData = False
            break
        elif (self.frame_pointer >= ((len(self.valid_data[self.pointer]) - self.seq_length) - 2)):
            self.frame_pointer = 0
            self.pointer += 1
        else:
            data = self.valid_data[self.pointer]
            idx = self.frame_pointer
            seq_all = np.copy(data[idx:((idx + self.seq_length) + 1)])
            dataset_index = int(seq_all[(0, 0)])
            map = self.map[dataset_index]
            (x_max, y_max, scale) = self.map_info[dataset_index]
            (seq_all_proc, seq_sgrid, seq_map) = self.preprocess_sequence(seq_all, isValid=True, isDiff=False)
            x = np.copy(seq_all_proc[0:(self.seq_length + 1)])
            grid = np.copy(seq_sgrid[0:(self.seq_length + 1)])
            print(('seq_pointer %d, frame_pointer %d' % (self.pointer, self.frame_pointer)))
            self.frame_pointer += int((self.seq_length + 1))
            break
    return (x, grid, map, x_max, y_max, scale, dataset_index, NotEndOfData)
dataset id (0)
object id (1)
target pose (2~3)
neighbor pose (4~63)

Read a batch randomly for validation and visualization
: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_sequence_valid(self):
    '\n\n        dataset id (0)\n        object id (1)\n        target pose (2~3)\n        neighbor pose (4~63)\n\n        Read a batch randomly for validation and visualization\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        '
    NotEndOfData = True
    while NotEndOfData:
        if (self.pointer >= len(self.valid_data)):
            x = []
            grid = []
            map = []
            x_max = []
            y_max = []
            scale = []
            dataset_index = []
            NotEndOfData = False
            break
        elif (self.frame_pointer >= ((len(self.valid_data[self.pointer]) - self.seq_length) - 2)):
            self.frame_pointer = 0
            self.pointer += 1
        else:
            data = self.valid_data[self.pointer]
            idx = self.frame_pointer
            seq_all = np.copy(data[idx:((idx + self.seq_length) + 1)])
            dataset_index = int(seq_all[(0, 0)])
            map = self.map[dataset_index]
            (x_max, y_max, scale) = self.map_info[dataset_index]
            (seq_all_proc, seq_sgrid, seq_map) = self.preprocess_sequence(seq_all, isValid=True, isDiff=False)
            x = np.copy(seq_all_proc[0:(self.seq_length + 1)])
            grid = np.copy(seq_sgrid[0:(self.seq_length + 1)])
            print(('seq_pointer %d, frame_pointer %d' % (self.pointer, self.frame_pointer)))
            self.frame_pointer += int((self.seq_length + 1))
            break
    return (x, grid, map, x_max, y_max, scale, dataset_index, NotEndOfData)