Thanks for the debugging.
It seems the error is related to the output of your model.
By default the inception model returns two outputs, the class logits and the aux_loss.
This is explained in the original inception paper.
In case you don’t need the auxiliary loss, you can create the model using aux_logits=False:
model = models.inception_v3(pretrained=True, aux_logits=False)