The shape of the model outputs doesn’t match the target shape.
Based on your model definition it seems you are dealing with a multi-class classification and your model should return an output in the shape [batch_size, nb_classes].
However, since you are never flattening the activation in forward, I assume the output might have the shape [batch_size, *, *, 10].
Add x = x.view(x.size(0), -1) before passing x to self.fc1 and it might work.