title: How do you alter the size of a Pytorch Dataset?
body: <p>Say I am loading MNIST from <code>torchvision.datasets.MNIST</code>, but I only want to load in 10000 images total, how would I slice the data to limit it to only some number of data points?  I understand that the <code>DataLoader</code> is a generator yielding data in the size of the specified batch size, but how do you slice datasets?</p>
  <pre><code>tr = datasets.MNIST('../data', train=True, download=True, transform=transform)
  te = datasets.MNIST('../data', train=False, transform=transform)
  train_loader = DataLoader(tr, batch_size=args.batch_size, shuffle=True, num_workers=4, **kwargs)
  test_loader = DataLoader(te, batch_size=args.batch_size, shuffle=True, num_workers=4, **kwargs)
  </code></pre>