title: Impact of using data shuffling in Pytorch dataloader
body: <p>I implemented an image classification network to classify a dataset of 100 classes by using Alexnet as a pretrained model and changing the final output layers.
  I noticed when I was loading my data like</p>
  
  <pre><code>trainloader = torch.utils.data.DataLoader(train_data, batch_size=32, shuffle=False)
  </code></pre>
  
  <p>, I was getting accuracy on validation dataset around 2-3 % for around 10 epochs but when I just changed <code>shuffle=True</code> and retrained the network, the accuracy jumped to 70% in the first epoch itself.</p>
  
  <p>I was wondering if it happened because in the first case the network was being shown one example after the other continuously for just one class for few instances resulting in network making poor generalizations during training or is there some other reason behind it?</p>
  
  <p>But, I did not expect that to have such a drastic impact.</p>
  
  <p>P.S: All the code and parameters were exactly the same for both the cases except changing the shuffle option. </p>