marcel1991:

Unfortunately I am not able to update Cuda 10.0 that easily and Pytorch 1.2. is the latest version for Cuda 10.0.


Note that the binaries ship with their own CUDA, cudnn, etc. runtime libraries, so your system installed CUDA version will not be used.
If you want to use your system CUDA, you would have to rebuild PyTorch from source.
Your code snippet could yield different output tensors e.g. if dropout or batchnorm layers were used, so you could try to call model.eval() before comparing the output.
PS: don’t use model.forward(input), as this will not use potentially registered hooks and could yield unwanted behavior. Call the model directly via model(input).