jettify / pytorch-optimizer

torch-optimizer -- collection of optimizers for Pytorch
Apache License 2.0
3.04k stars 299 forks source link

Minor modification in diffGrad #55

Closed shivram1987 closed 4 years ago

shivram1987 commented 4 years ago

Please replace state['previous_grad'] = grad with state['previous_grad'] = grad.clone() in line 117.

jettify commented 4 years ago

Thanks! Would you like to submit PR?

jettify commented 4 years ago

Fixed via https://github.com/jettify/pytorch-optimizer/pull/57

shivram1987 commented 4 years ago

Please submit PR...

jettify commented 4 years ago

@shivram1987 no problem, just wanted to check if you want to do that yourself :) @lucidrains helped with PR.

Thanks for DiffGrad!