Hi everyone, I’m new to pytorch.
I’m trying to split the original MNIST test set into a validation and a test set of the same size.
When i try
dataset_train = torchvision.datasets.MNIST("./mnist", train=True, download=True)
valid_and_test_set = torchvision.datasets.MNIST("./mnist", train=False, download=True)
dataset_valid, dataset_test = torch.utils.data.random_split(valid_and_test_set,[5000, 5000])

mu = dataset_train.data.float().mean()
mu_valid = dataset_valid.data.float().mean()

On the last line I get the error
AttributeError: 'Subset' object has no attribute 'data'

How can I handle this?
Thank you in advance.