Mat1 and mat2 shapes cannot be multiplied (256x320 and 640x8)

Hi ! I have problem with my CNN model. I don’t understand why my model works for summary when I give (1, 64, 16) and why it doesn’t work for real input ( it is batch, so it is tensor of inputs (256, 1, 64, 16)). I use torch.utils.data.DataLoader.
Summary:

My model:

Error:
RuntimeError: mat1 and mat2 shapes cannot be multiplied (256x320 and 640x8)
and it goes ahead in this line: self.fc1 = nn.Linear(64 * 5 * 2 , 8)

Can someone help me with this? Could you explain me, how solve this problem ? Thank you !