facebookresearch / darkforestGo

DarkForest, the Facebook Go engine.
Other
2.1k stars 325 forks source link

Training code BUG? #31

Closed songzhaozhe closed 7 years ago

songzhaozhe commented 7 years ago

In line 311 in darkforestGo/train/rl_framework/infra/bundle.lua: self.params[i]:add(-learning_rate, self.gparams[i])

I think this is weird since adding the learning rate with the gradient makes no sense, Maybe the author wanted to use 'addcmul' instead of 'add'?

yuandong-tian commented 7 years ago

Please check this document:

https://github.com/torch/torch7/blob/master/doc/maths.md

x:add(value, y) multiply-accumulates values of y into x.
songzhaozhe commented 7 years ago

@yuandong-tian Thank you! Sorry for the silly question. I missed out that sentence when reading the docs.