The difference between windows and Linux

One project works normally on windows. I migrated the project from windows to Linux server, but the project gradient exploded on Linux. The data set has been checked and is available. What’s the problem?

Have you checked the versions of PyTorch you used? (Among other packages). Are you using the same environment? Same initial weights? Fixed the pseudorandom seeds between versions to rule out any randomness?

Only the CUDA versions of the two are different.Linux is11.7,windows is 11.1

Can you share a minimal reproducible example for your error?

This may be difficult, but now pycharm reports an error on the data set, which is not reflected in the windows Runtime: “the number of dimensions for input and target should be the same.” I am trying to solve this problem

Check the shape of your loss function inputs, and also share some code and the full error message (including the stacktrace). I can’t help if you can’t show what the problem is.