How do you subset the MNIST training data? It’s 60,000 images, how can you reduce it to say 2000?
Here’s the code
>>> from torchvision import datasets, transforms


>>> 
>>> 
>>> train_all_mnist = datasets.MNIST('../data', train=True, download=True,
...                    transform=transforms.Compose([
...                        transforms.ToTensor(),
...                        transforms.Normalize((0.1307,), (0.3081,))
...                    ]))
Files already downloaded
>>> train_all_mnist
<torchvision.datasets.mnist.MNIST object at 0x7f89a150cfd0>

How do I subset train_all_mnist ?
Or, alternatively I could just download it again, and hack this line to 2000,
https://github.com/pytorch/vision/blob/master/torchvision/datasets/mnist.py#L64 91
It’s a bit ugly - anyone know a neater way to do this?