def __init__( self, split, batchsize_per_replica, shuffle, transform, num_samples, clips_per_video, samples, ): self.samples = samples input_tensors = [sample["input"] for sample in samples] target_tensors = [sample["target"] for sample in samples] dataset = ListDataset(input_tensors, target_tensors, loader=lambda x: x) super(TestVideoDataset, self).__init__( dataset, split, batchsize_per_replica, shuffle, transform, num_samples, clips_per_video, )
def __init__(self, samples, batchsize_per_replica=1): input_tensors = [sample["input"] for sample in samples] target_tensors = [sample["target"] for sample in samples] dataset = ListDataset(input_tensors, target_tensors, loader=lambda x: x) super().__init__( dataset=dataset, batchsize_per_replica=batchsize_per_replica, shuffle=False, transform=None, num_samples=len(samples), )