This is the error i get:
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-124-938a2a3c90b1> in <module>()
----> 1 images, pred = show_batch_images(train_loader,model)

<ipython-input-123-0b9e63821ed9> in show_batch_images(dataloader, model)
      2     images, labels = next(iter(dataloader))
      3     print(labels)
----> 4     out = custom_vgg.forward(images,model)
      5     out_class = out[0]
      6     out_class1 = out[1]

<ipython-input-121-35ba48ae34f5> in forward(self, images, model)
      2     def forward(self, images,model):
      3         out = model.features(images)
----> 4         return model.classifier(out), model.classifier1(out)

/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
    487             result = self._slow_forward(*input, **kwargs)
    488         else:
--> 489             result = self.forward(*input, **kwargs)
    490         for hook in self._forward_hooks.values():
    491             hook_result = hook(self, input, result)

/opt/conda/lib/python3.6/site-packages/torch/nn/modules/container.py in forward(self, input)
     90     def forward(self, input):
     91         for module in self._modules.values():
---> 92             input = module(input)
     93         return input
     94 

/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
    487             result = self._slow_forward(*input, **kwargs)
    488         else:
--> 489             result = self.forward(*input, **kwargs)
    490         for hook in self._forward_hooks.values():
    491             hook_result = hook(self, input, result)

/opt/conda/lib/python3.6/site-packages/torch/nn/modules/linear.py in forward(self, input)
     65     @weak_script_method
     66     def forward(self, input):
---> 67         return F.linear(input, self.weight, self.bias)
     68 
     69     def extra_repr(self):

/opt/conda/lib/python3.6/site-packages/torch/nn/functional.py in linear(input, weight, bias)
   1352         ret = torch.addmm(torch.jit._unwrap_optional(bias), input, weight.t())
   1353     else:
-> 1354         output = input.matmul(weight.t())
   1355         if bias is not None:
   1356             output += torch.jit._unwrap_optional(bias)

RuntimeError: size mismatch, m1: [3584 x 7], m2: [25088 x 4096] at /opt/conda/conda-bld/pytorch_1549630534704/work/aten/src/TH/generic/THTensorMath.cpp:940