Pytorch: Remove dampening from SGD

Created on 31 Aug 2016  ·  3Comments  ·  Source: pytorch/pytorch

I think we could remove dampening parameter from SGD here https://github.com/pytorch/pytorch/blob/master/torch/optim/sgd.py#L10, it is confusing and changes momentum if used

Most helpful comment

This change of default dampening has just hit me :) Spent a few days figuring out why the ported net stopped reaching right accuracy levels. Thanks @szagoruyko for the tip.

Previously, with momentum = 0.9 (and 1 - dampening = 0.1), the old gradient was 9x more important than the current one. Now it is only 10% less important (1 - dampening = 1).

Possibly this is worth mentioning in
http://pytorch.org/docs/optim.html or in http://pytorch.org/tutorials/beginner/former_torchies_tutorial.html, since learning rates now need to be adjusted when porting lua Torch code, despite naive expectations.

All 3 comments

maybe set the default value to 0 instead of momentum?

This change of default dampening has just hit me :) Spent a few days figuring out why the ported net stopped reaching right accuracy levels. Thanks @szagoruyko for the tip.

Previously, with momentum = 0.9 (and 1 - dampening = 0.1), the old gradient was 9x more important than the current one. Now it is only 10% less important (1 - dampening = 1).

Possibly this is worth mentioning in
http://pytorch.org/docs/optim.html or in http://pytorch.org/tutorials/beginner/former_torchies_tutorial.html, since learning rates now need to be adjusted when porting lua Torch code, despite naive expectations.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mishraswapnil picture mishraswapnil  ·  3Comments

soumith picture soumith  ·  3Comments

ikostrikov picture ikostrikov  ·  3Comments

SeparateReality picture SeparateReality  ·  3Comments

bartolsthoorn picture bartolsthoorn  ·  3Comments