weight decay

1 作用

使得拟合的模型更平滑,更具泛化性。是正则化网络的一种方式。是一种降低模型容量的方法,使得过拟合的模型不会过度拟合。

2 工作原理

每一步将权重衰减到零,下面的代码表示了weight_decay发挥作用的机制

# run on every step
parameters *= (1 - learning_rate * weight_decay)
... # update parameters normally

weight_decay取值范围:1e-5 to 1

参照链接

猜你喜欢

转载自blog.csdn.net/m0_45290027/article/details/130753559