[BUG] Weird behavior between evaluation and training mode

Thanks :grinning::wink:

Hi Mohammad

output1:

output2:

As @mfayyaz and @ptrblck said, the issue would occur in BN section.

have a nice time :slight_smile:

So what is the problem? You mean that .train(False) does not work properly?

You have never set it to .train(False) in your training script. You just disabled the gradients.
That’s why BatchNorm still updated its running_* stats.

1 Like

Okay. I have got it. Thank you