Fix BatchNorm running variance estimator#3817
Conversation
|
I looked into this since I've been in these normalization layers recently, and I think the PR is actually consistent with the paper — the unbiased estimate is applied only to Walking
So training normalization stays on the biased batch variance and only the inference statistic becomes unbiased, which matches Ioffe & Szegedy (inference Quick sanity check (n=5): Might be worth a one-line code comment on why |
|
Thanks a lot for looking into this! After checking PyTorch's implementation I agree this PR does the right fix. On the implementation I think we can use |
|
Thanks, updated in 9a4c1be:\n\n- switched the running_var update to guarded |
Summary
Tests