-
one of them (model or input) is in cpu and the other is in GPU.
Upload them to GPU usingmodel = model.cuda(), image = image.cuda()
commands. -
The output that we get from pretrained models are unnormalized linear layer outputs.
you can useF.softmax()
to convert them to probabilities.