Thanks. Is there a preferred method to do the processing? Right now, I thought to do something like:
dataset = MNIST(f'/tmp/mnist/',
                download=True,
                transform=Compose([# List of transforms
                                   ]), train=True)

dl = DataLoader(dataset, batch_size=60000)
x, y = next(iter(dl))
torch.save(x, "train_data.pt")
torch.save(y, "train_targets.pt")


Is there a more efficient/preferred method?