def __getitem__(self, idx):
     filename = self.file_list[idx]
     image = rep_utils.load_compressed_array(
         os.path.join(self.input_path, filename))
     image = np.swapaxes(image, 1, 3)
     # sincos = np.load(os.path.join(self.target_path, '%s.npy' % filename))
     return image, filename
    def __getitem__(self, idx):
        filenames = self.batchs[idx]
        images = []
        sincos = []
        lengths = []
        for filename in filenames:
            image = rep_utils.load_compressed_array(
                os.path.join(self.input_path, '%s.npy' % filename))
            image = np.swapaxes(image, 1, 3)
            images.append(image)
            sincos.append(
                np.load(os.path.join(self.target_path, '%s.npy' % filename)))
            lengths.append(np.shape(images[-1])[0])

        images = np.concatenate(images)
        sincos = np.concatenate(sincos, 1)
        return images, sincos, filenames, lengths