Solved by saransh in post #4 
              
              
                The problem is resolved. 
if __name__=='__main__':
    # Instead of this
    model_ft = models.inception_v3(pretrained = True)
    # The trick is to use
    model_ft = models.inception_v3(pretrained = True, aux_logits=False)

If you call InceptionV3 with aux_logits turned off, the constructor does n…