Did you change more than the last layer?
I assume your input is now in the shape [batch_size, 3, 224, 224]?
The model looks alright and I can’t see, where this size mismatch occurs.
Could you post the whole stack trace or the mode where you’ve manipulated the model?