Thanks @Nikronic  a lot for looking into the code.
I have added the line print(out.shape) right after the line out = self.bn(out) and got the following output in front of the error:
torch.Size([10, 64, 3, 3])

Then I changed from out = out.view(-1, 64*4*4) to out = out.view(-1, 64*3*3) and the error message now reads as
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-23-84df8dc8fb2f> in <module>
     14         images, labels = batch
     15 
---> 16         preds = dense_network(images) # Pass Batch
     17 
     18         loss = F.cross_entropy(preds, labels)

~\anaconda3\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
    548             result = self._slow_forward(*input, **kwargs)
    549         else:
--> 550             result = self.forward(*input, **kwargs)
    551         for hook in self._forward_hooks.values():
    552             hook_result = hook(self, input, result)

<ipython-input-22-b8522ba5d926> in forward(self, x)
     95         out = out.reshape(-1, 64*3*3)
     96 
---> 97         out = self.pre_classifier(out)
     98         out = self.classifier(out)
     99 

~\anaconda3\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
    548             result = self._slow_forward(*input, **kwargs)
    549         else:
--> 550             result = self.forward(*input, **kwargs)
    551         for hook in self._forward_hooks.values():
    552             hook_result = hook(self, input, result)

~\anaconda3\lib\site-packages\torch\nn\modules\linear.py in forward(self, input)
     85 
     86     def forward(self, input):
---> 87         return F.linear(input, self.weight, self.bias)
     88 
     89     def extra_repr(self):

~\anaconda3\lib\site-packages\torch\nn\functional.py in linear(input, weight, bias)
   1608     if input.dim() == 2 and bias is not None:
   1609         # fused op is marginally faster
-> 1610         ret = torch.addmm(bias, input, weight.t())
   1611     else:
   1612         output = input.matmul(weight.t())

RuntimeError: size mismatch, m1: [10 x 576], m2: [1024 x 512] at C:\w\b\windows\pytorch\aten\src\TH/generic/THTensorMath.cpp:41