rasbt:

why not using the dataloader to fetch data from an array in memory instead of from disk?


Thanks for the suggestion, do you have any pointers to examples. My understanding was that when you create the dataset you’ll have to specify the root where the data is. Usually that points to a directory on disk could that also be just numpy array?
train_dataset = dsets.MNIST(root=numpy.ranom.randn(100, 784), train=True, transform=transform, download=False)