title: Get a smaller MNIST dataset in pytorch
body: <p>This is how I load the dataset but the dataset is too big. There are about 60k images. so I would like to limit it to 1/10 for training. Is there any built-in method I can do that?</p>
  <pre><code>from torchvision import datasets
  import torchvision.transforms as transforms
  train_data = datasets.MNIST(
      root='data',
      train=True,
      transform=transforms.Compose(
          [transforms.ToTensor()]
      ),
      download=True
  )
  
  print(train_data)
  
  print(train_data.data.size())
  print(train_data.targets.size())
  
  
  
  loaders = {
      'train': DataLoader(train_data,
                          batch_size=100),
  }
  </code></pre>