can someone help me solve this problem, look for many solutions but they have not worked for me
error al entrenar
the images have a size of ([64, 3, 224, 224])
I tried to change the batch-size or image size but I still get errors

Epoch 1/30
----------
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
&lt;ipython-input-160-dbcdb17ea6ee&gt; in &lt;module&gt;()
      1 epochs = 30
      2 net.to(device)
----&gt; 3 net = train_model(net, criterion, optimizer, sched, epochs)

2 frames
&lt;ipython-input-157-d34ea1683b12&gt; in forward(self, x)
     12     x = self.pool(F.relu(self.conv1(x)))
     13     x = self.pool(F.relu(self.conv2(x)))
---&gt; 14     x = x.view(x.size(0), 16 * 38 * 38)
     15     x = F.relu(self.fc1(x))
     16     x = F.relu(self.fc2(x))

RuntimeError: shape '[64, 23104]' is invalid for input of size 2876416


This is because the product of your spatial &amp; channel dimensions is not equivalent to 23104 but rather is equal to 2876416. To flatten your tensor, you can try out = out.view(out.size(0), -1) instead, which should work fine.
