Closed jiang-yuan closed 2 years ago
Might also be the case for addcmul_
and other operations further down the line https://github.com/cybertronai/pytorch-lamb/blob/5ef3ebd5e32f7a7bdcddbb2ce55879bfa88f6a5f/pytorch_lamb/lamb.py#L96-L123
Docs
https://pytorch.org/docs/stable/tensors.html#torch.Tensor.add
It looks like #11 resolves the issues with .add_
. Is the invocation for addcmul_
actually different from https://pytorch.org/docs/stable/generated/torch.addcmul.html? It doesn't look wrong from a quick glance, and I'm not seeing any errors locally
Ah, I'm not sure!
My comment was just a breadcrumb FYI, as reaction to some warnings on my screen while using this lib :)
Some other ppl getting these warnings: https://github.com/pytorch/pytorch/issues/32861
UserWarning: This overload of add is deprecated: add(Number alpha, Tensor other) Consider using one of the following signatures instead: add_(Tensor other, *, Number alpha) (Triggered internally at /opt/conda/conda-bld/pytorch_1595661244635/work/torch/csrc/utils/python_arg_parser.cpp:797.) expavg.mul(beta1).add_(1 - beta1, grad)