Solved by ptrblck in post #2 
              
              
                After loading your model, you should set it into evaluation mode with: 
densenet.eval()

I’ve tested your code and the result for this image is class 207, which is golden retriever.