Hi,
This is most likely some issue in your code that has side effect.
What is the loss function you’re using? Do you modify any Tensor or state inplace during that computation?
Also what about the rest of the code between the two? And how do you check that you get different results?