RuntimeError: size mismatch, m1: [4 x 3136], m2: [64 x 5] at c:\a\w\1\s\tmp_conda_3.7_1

I used python 3 and when i insert transform random crop size 224 it gives miss match error.

my code here
what did i wrong ?

The number of input features of your self.fc is wrong. Currently, the activation before this layer has a shape of [batch_size, 64, 7, 7]. Either you set in_features=64*7*7 for self.fc or use an adaptive pooling layer with output_size=1 before the linear layer.