BatchNorm动量约定PyTorch

12

批标准化动量约定(默认值为0.1)是否正确,例如在其他库(如Tensorflow)中,通常默认为0.9或0.99?或者我们只是使用了不同的约定?


https://discuss.pytorch.org/t/batch-norm-momentum-default-value/11955 - Wasi Ahmad
1个回答

21

似乎PyTorch和TensorFlow的参数化约定不同,因此在PyTorch中的0.1相当于在TensorFlow中的0.9。

更准确地说:

在TensorFlow中:

running_mean = decay*running_mean + (1-decay)*new_value

在PyTorch中:

running_mean = (1-decay)*running_mean + decay*new_value

这意味着在PyTorch中的decay值等同于在Tensorflow中的值(1-decay).


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接