Performance, Pytorch, Deep Learning, Artificial Intelligence, Tensorboard.
self.img_size = [256, 256] def __len__(self): return 1000000 def __getitem__(self, index): rand_image = torch.randn([3]+self.img_size, dtype=torch.float32) rand_label = torch.randint(low=-1, high=self.num_classes, size=self.img_size) return rand_image, rand_label train_set = FakeDataset()