计算移动平均值有误, BN的momentum默认值是0.1不是0.9
Closed this issue · 2 comments
tangzhongliang commented
https://github.com/Jermmy/pytorch-quantization-demo/blob/master/module.py#L351-L356
self.bn_module.running_mean = \
self.bn_module.momentum * self.bn_module.running_mean + \
(1 - self.bn_module.momentum) * mean
self.bn_module.running_var = \
self.bn_module.momentum * self.bn_module.running_var + \
(1 - self.bn_module.momentum) * var
Jermmy commented
您好,您的邮件已收到,我会尽快查看。
Jermmy commented
@tangzhongliang 感谢指出,已更正。