Skip to content

Commit cb7bdb9

Browse files
authored
Add QHAdam to the readme (#91)
1 parent 5155f0b commit cb7bdb9

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

README.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ Supported Optimizers
6161
| `PID`_ | http://www4.comp.polyu.edu.hk/~cslzhang/paper/CVPR18_PID.pdf |
6262
+-------------+-------------------------------------------------------------------------------+
6363
| | |
64+
| `QHAdam`_ | https://arxiv.org/abs/1810.06801 |
65+
+-------------+-------------------------------------------------------------------------------+
66+
| | |
6467
| `QHM`_ | https://arxiv.org/abs/1810.06801 |
6568
+-------------+-------------------------------------------------------------------------------+
6669
| | |
@@ -307,6 +310,35 @@ PID
307310
**Reference Code**: https://github.com/tensorboy/PIDOptimizer
308311

309312

313+
QHAdam
314+
------
315+
316+
+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
317+
| .. image:: https://raw.githubusercontent.com/jettify/pytorch-optimizer/master/docs/rastrigin_QHAdam.png | .. image:: https://raw.githubusercontent.com/jettify/pytorch-optimizer/master/docs/rosenbrock_QHAdam.png |
318+
+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
319+
320+
.. code:: python
321+
322+
import torch_optimizer as optim
323+
324+
# model = ...
325+
optimizer = optim.QHAdam(
326+
m.parameters(),
327+
lr= 1e-3,
328+
betas=(0.9, 0.999),
329+
nus=(1.0, 1.0),
330+
weight_decay=0,
331+
decouple_weight_decay=False,
332+
eps=1e-8,
333+
)
334+
optimizer.step()
335+
336+
337+
**Paper**: *Quasi-hyperbolic momentum and Adam for deep learning* (2019) [https://arxiv.org/abs/1810.06801]
338+
339+
**Reference Code**: https://github.com/facebookresearch/qhoptim
340+
341+
310342
QHM
311343
---
312344

docs/rastrigin_QHAdam.png

727 KB
Loading

docs/rosenbrock_QHAdam.png

443 KB
Loading

examples/viz_optimizers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ def execute_experiments(
171171
(optim.SGDW, -8, -1.5),
172172
(optim.PID, -8, -1.0),
173173
(optim.QHM, -6, -0.2),
174+
(optim.QHAdam, -8, 0.1),
174175
]
175176
execute_experiments(
176177
optimizers,

0 commit comments

Comments
 (0)