Closed sachinspanicker closed 10 months ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Sorry that I have missed this pull request earlier. Thanks for the contribution!
Error
add_() received an invalid combination of arguments - got unrecognized keyword arguments: inplace
My torch version
>>> import torch
>>> torch.__version__
'2.1.0.dev20230829+cu121'
@liuslnlp add_
is already an inplace method, so I remove this parameter in method, and it works, you can have a try
As the comments above suggested, there isn't such an argument as inplace=True
in torch.Tensor.add_
. for both torch versions above or under 2.0. I believe this code hasn't been tested. A rollback might be needed? @crazydonkey200
…icient by using the torch.sign function's inplace mode. This will prevent the need to create a new tensor for the updated parameter, which can save a significant amount of time for large models.