I’m trying to use torchvision.transforms.functional.invert() on an entire dataset,
Like the following:
train_ds = datasets.MNIST('./data', train=True, download=True,
                       transform=transforms.Compose([
                           transforms.ToTensor(),
                           transforms.functional.invert()
                       ]))

But I got error:
TypeError: invert() missing 1 required positional argument: 'img'
Is there a way to invert all images in a dataset without looping over each image?