question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This overload of addcmul_ is deprecated: addcmul_(Number value, Tensor tensor1, Tensor tensor2)

See original GitHub issue

I get the following warning when using ranger with pytorch 1.6.0

/path/Ranger-Deep-Learning-Optimizer/ranger/ranger.py:138: UserWarning: This overload of addcmul_ is deprecated:
        addcmul_(Number value, Tensor tensor1, Tensor tensor2)
Consider using one of the following signatures instead:
        addcmul_(Tensor tensor1, Tensor tensor2, *, Number value) (Triggered internally at  /pytorch/torch/csrc/utils/python_arg_parser.cpp:766.)
  exp_avg_sq.mul_(beta2).addcmul_(1 - beta2, grad, grad)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
hiyygcommented, Sep 21, 2020

@lessw2020 I noticed in ranger2020.py, gc_loc is set to True by default. However, the original repo seems to suggest using gc_loc=False for adaptive learning rate methods. So why do you set it to True by default?

0reactions
Harly-1506commented, Aug 9, 2022

fix addcmul and add_

Try this: exp_avg_sq.mul_(beta2).addcmul(grad, grad, value = 1 - beta2) exp_avg.mul_(beta1).add_(grad, alpha = 1 - beta1 )

Read more comments on GitHub >

github_iconTop Results From Across the Web

This overload of add_ , addcmul_, addcdiv_ is deprecated ...
Hi, I am new to pytorch and implementing A3C. For this I have got a code for SharedAdam optimizer which is of pytorch...
Read more >
UserWarning: This overload of add_ is deprecated - CSDN博客
UserWarning: This overload of addcmul_ is deprecated: addcmul_(Number value, Tensor tensor1, Tensor tensor2) Consider using one of the ...
Read more >
mysubmit_kernel - Kaggle
Time # Log Message 1.8s 1 Converting notebook __notebook__.ipynb to notebook 7.1s 2 Executing notebook with kernel: python3 638.9s 3 loading annotations into memory...
Read more >
Ranger-Deep-Learning-Optimizer - Bountysource
/path/Ranger-Deep-Learning-Optimizer/ranger/ranger.py:138: UserWarning: This overload of addcmul_ is deprecated: addcmul_(Number value, Tensor tensor1, ...
Read more >
torch_addcmul: Addcmul in torch - Tensor - Rdrr.io
addcmul (input, tensor1, tensor2, *, value=1, out=NULL) -> Tensor. Performs the element-wise multiplication of tensor1 by tensor2 , multiply ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found