You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems as though the usage of add_() in lars.py is deprecated. I get
home/tristanengst/miniconda3/envs/py39ISICLE/lib/python3.9/site-packages/torchlars/lars.py:140: 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_1639180487213/work/torch/csrc/utils/python_arg_parser.cpp:1050.)
p.grad.add_(weight_decay, p.data)
whenever I use the optimizer. I believe the signature of add_() was changed in PyTorch 1.5, so we're well past a time when the old signature could represent a somewhat current PyTorch version.
Unless I'm mistaken, this can be fixed by changing line 140 of lars.py from
p.grad.add_(weight_decay, p.data)
to
p.grad.add_(p.data, alpha=weight_decay)
Would it be possible to see this change adopted for versions of torchlars installed alongside newer PyTorch versions? Thanks!
The text was updated successfully, but these errors were encountered:
It seems as though the usage of
add_()
inlars.py
is deprecated. I getwhenever I use the optimizer. I believe the signature of
add_()
was changed in PyTorch 1.5, so we're well past a time when the old signature could represent a somewhat current PyTorch version.Unless I'm mistaken, this can be fixed by changing line 140 of
lars.py
fromto
Would it be possible to see this change adopted for versions of torchlars installed alongside newer PyTorch versions? Thanks!
The text was updated successfully, but these errors were encountered: