Sorry for replying late. I did some experiment in the day.
It is the same if i remove the model.eval().
And I also try to print some parameters of specific layers. It’s the same parameters.
After further debugging, I find that when I stop at the last batch in train(), nomater what I input it comes out almost the same result.


As you can see, when I stop at the last batch in train(), the result is the same. But in the last batch, the result will change.

Do you have any more suggestions?