I think first you should be doing predictions in evaluation mode that is model.eval() which will deactivate batchnorm and dropout layers in both c++ and python. In your python code, you are using a transform transforms.CenterCrop which you are not doing in c++. And there should not be large difference in answers between cpp and python. For Example, if cpp gives 0.75 then python should be in range 0.74-0.76.
Why do you want to compare input tensor?