Comments (4)
Hi
We implement AdamP based on PyTorch 1.3
PyTorch 1.5 changes default args of in-place operations such as add_()
and addcmul_()
.
So, following lines of AdamP makes the warnings
Lines 80 to 81 in 64a6310
Line 101 in 64a6310
If you change it as
exp_avg.mul_(beta1).add_(grad, alpha=1 - beta1)
exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1 - beta2)
p.data.add_(perturb, alpha=-step_size)
then the warnings will disappear
But, I'm not sure whether this changes is compatible with old versions. So, I will not apply the changes to master
or pip.
You can also find difference in official AdamW.py
Torch 1.4
https://github.com/pytorch/pytorch/blob/74044638f755cd8667bedc73da4dbda4aa64c948/torch/optim/adamw.py#L100-L101
Torch 1.5
https://github.com/pytorch/pytorch/blob/4ff3872a2099993bf7e8c588f7182f3df777205b/torch/optim/adamw.py#L104-L105
from adamp.
@Junyoungpark
We just release adamp==0.3.0
(https://github.com/clovaai/AdamP/releases/tag/v0.3.0).
Please retry pip install adamp --upgrade
:)
from adamp.
thanks for the comments! I'll use the code snippet for torch 1.5
from adamp.
Inplace operation was changed in #7.
Thanks for your contribution.
from adamp.
Related Issues (13)
- Hyperparameters of AdamW HOT 7
- example params HOT 2
- unexptected behavior of AdamP on CPU? HOT 5
- Could it be equivalent to normalize the weights ? HOT 2
- Good bug in your implementation of AdamP HOT 1
- learning rate scheduler for adamp? HOT 3
- The difference with Adam and AdamP in the code HOT 3
- Experiment of Adam with warm up? HOT 2
- Question about eq (5) in section 2.3 HOT 1
- Builtin cosine_similarity HOT 4
- Recommended value to weight_decay for AdamP? HOT 1
- Runtime: Adam vs AdamP HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adamp.