From naive paper of BatchNorm, we know that BN is for reducing internal Covarite Shift.
I just wonder how BN here runs correctly.
I check the DOC and guess:
Train ----> set Model.train()
Test -----> set Model.eval()
am I right ?
From naive paper of BatchNorm, we know that BN is for reducing internal Covarite Shift.
I just wonder how BN here runs correctly.
I check the DOC and guess:
Train ----> set Model.train()
Test -----> set Model.eval()
am I right ?
Yes, this is correct. The same applies to dropout as well. This changes which statistics BN uses (batch or global).
http://pytorch.org/docs/nn.html#torch.nn.Module.eval