Thanks for the reply, when I reshape it like you said, I get this error:
RuntimeError                              Traceback (most recent call last)
<ipython-input-17-ef616b23c264> in <module>
     81 # train the model
     82 model_scratch = train(100, loader_scratch, model_scratch, optimizer_scratch, 
---> 83                       criterion_scratch, use_cuda, 'model_scratch.pt')
     84 
     85 # load the model that got the best validation accuracy

<ipython-input-17-ef616b23c264> in train(n_epochs, loaders, model, optimizer, criterion, use_cuda, save_path)
     27             optimizer.zero_grad()
     28             # forward pass: compute predicted outputs by passing inputs to the model
---> 29             output = model(data)
     30             # calculate the batch loss
     31             loss = criterion(output, target)

~\Anaconda3\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
    491             result = self._slow_forward(*input, **kwargs)
    492         else:
--> 493             result = self.forward(*input, **kwargs)
    494         for hook in self._forward_hooks.values():
    495             hook_result = hook(self, input, result)

<ipython-input-16-8e80a47d55dc> in forward(self, x)
     31         x = self.dropout(x)
     32         # add 1st hidden layer, with relu activation function
---> 33         x = F.relu(self.fc1(x))
     34         # add dropout layer
     35         x = self.dropout(x)

~\Anaconda3\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
    491             result = self._slow_forward(*input, **kwargs)
    492         else:
--> 493             result = self.forward(*input, **kwargs)
    494         for hook in self._forward_hooks.values():
    495             hook_result = hook(self, input, result)

~\Anaconda3\lib\site-packages\torch\nn\modules\linear.py in forward(self, input)
     90     @weak_script_method
     91     def forward(self, input):
---> 92         return F.linear(input, self.weight, self.bias)
     93 
     94     def extra_repr(self):

~\Anaconda3\lib\site-packages\torch\nn\functional.py in linear(input, weight, bias)
   1404     if input.dim() == 2 and bias is not None:
   1405         # fused op is marginally faster
-> 1406         ret = torch.addmm(bias, input, weight.t())
   1407     else:
   1408         output = input.matmul(weight.t())

RuntimeError: size mismatch, m1: [1 x 53760], m2: [50176 x 500] at C:/w/1/s/tmp_conda_3.7_044431/conda/conda-bld/pytorch_1556686009173/work/aten/src\THC/generic/THCTensorMathBlas.cu:268

I then realized that the shape of my images are not proportional 1:1, I changed the transform pipe like this:
min_img_size = 224  # The min size, as noted in the PyTorch pretrained models doc, is 224 px.
transform_pipeline = transforms.Compose([transforms.Resize((min_img_size, min_img_size)),
                                     transforms.ToTensor(),
                                     transforms.Normalize(mean=[0.485, 0.456, 0.406],
                                                          std=[0.229, 0.224, 0.225])])

But now got this error:
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-20-ef616b23c264> in <module>
     81 # train the model
     82 model_scratch = train(100, loader_scratch, model_scratch, optimizer_scratch, 
---> 83                       criterion_scratch, use_cuda, 'model_scratch.pt')
     84 
     85 # load the model that got the best validation accuracy

<ipython-input-20-ef616b23c264> in train(n_epochs, loaders, model, optimizer, criterion, use_cuda, save_path)
     31             loss = criterion(output, target)
     32             # backward pass: compute gradient of the loss with respect to model parameters
---> 33             loss.backward()
     34             # perform a single optimization step (parameter update)
     35             optimizer.step()

~\Anaconda3\lib\site-packages\torch\tensor.py in backward(self, gradient, retain_graph, create_graph)
    105                 products. Defaults to ``False``.
    106         """
--> 107         torch.autograd.backward(self, gradient, retain_graph, create_graph)
    108 
    109     def register_hook(self, hook):

~\Anaconda3\lib\site-packages\torch\autograd\__init__.py in backward(tensors, grad_tensors, retain_graph, create_graph, grad_variables)
     91     Variable._execution_engine.run_backward(
     92         tensors, grad_tensors, retain_graph, create_graph,
---> 93         allow_unreachable=True)  # allow_unreachable flag
     94 
     95 

RuntimeError: cublas runtime error : the GPU program failed to execute at C:/w/1/s/tmp_conda_3.7_044431/conda/conda-bld/pytorch_1556686009173/work/aten/src/THC/THCBlas.cu:25