Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop radam optimizer. #377

Merged
merged 1 commit into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ Supported Optimizers
| `QHM`_ | https://arxiv.org/abs/1810.06801 |
+---------------+--------------------------------------------------------------------------------------------------------------------------------------+
| | |
| `RAdam`_ | https://arxiv.org/abs/1908.03265 |
+---------------+--------------------------------------------------------------------------------------------------------------------------------------+
| | |
| `Ranger`_ | https://medium.com/@lessw/new-deep-learning-optimizer-ranger-synergistic-combination-of-radam-lookahead-for-the-best-of-2dc83f79a48d |
+---------------+--------------------------------------------------------------------------------------------------------------------------------------+
| | |
Expand Down Expand Up @@ -768,33 +765,6 @@ QHM
**Reference Code**: https://github.com/facebookresearch/qhoptim


RAdam
-----

+---------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
| .. image:: https://raw.githubusercontent.com/jettify/pytorch-optimizer/master/docs/rastrigin_RAdam.png | .. image:: https://raw.githubusercontent.com/jettify/pytorch-optimizer/master/docs/rosenbrock_RAdam.png |
+---------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+

.. code:: python

import torch_optimizer as optim

# model = ...
optimizer = optim.RAdam(
m.parameters(),
lr= 1e-3,
betas=(0.9, 0.999),
eps=1e-8,
weight_decay=0,
)
optimizer.step()


**Paper**: *On the Variance of the Adaptive Learning Rate and Beyond* (2019) [https://arxiv.org/abs/1908.03265]

**Reference Code**: https://github.com/LiyuanLucasLiu/RAdam


Ranger
------

Expand Down
8 changes: 0 additions & 8 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,6 @@ QHM
.. autoclass:: torch_optimizer.QHM
:members:

.. _RAdam:

RAdam
-----

.. autoclass:: torch_optimizer.RAdam
:members:

.. _SGDP:

SGDP
Expand Down
3 changes: 0 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ Supported Optimizers
| :ref:`QHM` | https://arxiv.org/abs/1810.06801 |
+-----------------+-------------------------------------------------------------------------------+
| | |
| :ref:`RAdam` | https://arxiv.org/abs/1908.03265 |
+-----------------+-------------------------------------------------------------------------------+
| | |
| :ref:`Ranger` | https://arxiv.org/abs/1908.00700v2 |
+-----------------+-------------------------------------------------------------------------------+
| | |
Expand Down
Binary file removed docs/rastrigin_RAdam.png
Binary file not shown.
Binary file removed docs/rosenbrock_RAdam.png
Binary file not shown.
1 change: 0 additions & 1 deletion examples/viz_optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ def LookaheadYogi(*a, **kw):
(optim.Lamb, -8, -2.9),
(optim.MADGRAD, -8, 0.5),
(optim.NovoGrad, -8, -1.7),
(optim.RAdam, -8, 0.5),
(optim.Yogi, -8, 0.1),
# SGD/Momentum based
(optim.AccSGD, -8, -1.4),
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def _read_version():
'pid',
'qhadam',
'qhm',
'radam',
'sgdw',
'yogi',
'ranger',
Expand Down
1 change: 0 additions & 1 deletion tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def build_lookahead(*a, **kw):
{'lr': 2.9, 'betas': (0.9, 0.999), 'grad_averaging': True},
900,
),
(optim.RAdam, {'lr': 0.01, 'betas': (0.9, 0.95), 'eps': 1e-3}, 800),
(optim.SGDW, {'lr': 0.002, 'momentum': 0.91}, 900),
(optim.DiffGrad, {'lr': 0.5}, 500),
(optim.AdaMod, {'lr': 1.0}, 800),
Expand Down
1 change: 0 additions & 1 deletion tests/test_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def build_lookahead(*a, **kw):
optim.PID,
optim.QHAdam,
optim.QHM,
optim.RAdam,
optim.Ranger,
optim.RangerQH,
optim.RangerVA,
Expand Down
1 change: 0 additions & 1 deletion tests/test_optimizer_with_nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def build_lookahead(*a, **kw):
(optim.PID, {'lr': 0.01, 'weight_decay': 1e-3, 'momentum': 0.1}, 200),
(optim.QHAdam, {'lr': 0.1, 'weight_decay': 1e-3}, 200),
(optim.QHM, {'lr': 0.1, 'weight_decay': 1e-5, 'momentum': 0.2}, 200),
(optim.RAdam, {'lr': 1.0, 'weight_decay': 1e-3}, 200),
(optim.Ranger, {'lr': 0.1, 'weight_decay': 1e-3}, 200),
(optim.RangerQH, {'lr': 0.0124, 'weight_decay': 1e-3}, 1100),
(optim.RangerVA, {'lr': 0.2214, 'weight_decay': 1e-3}, 500),
Expand Down
5 changes: 0 additions & 5 deletions tests/test_param_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def assert_sparse_not_supported(optimizer_class, err_msg=None):
optim.DiffGrad,
optim.Lamb,
optim.NovoGrad,
optim.RAdam,
optim.Yogi,
]

Expand All @@ -49,7 +48,6 @@ def test_sparse_not_supported(optimizer_class):
optim.PID,
optim.QHAdam,
optim.QHM,
optim.RAdam,
optim.SGDP,
optim.SGDW,
optim.SWATS,
Expand Down Expand Up @@ -79,7 +77,6 @@ def test_learning_rate(optimizer_class):
optim.MADGRAD,
optim.NovoGrad,
optim.QHAdam,
optim.RAdam,
optim.SGDP,
optim.SWATS,
optim.Yogi,
Expand Down Expand Up @@ -112,7 +109,6 @@ def test_eps_validation(optimizer_class):
optim.PID,
optim.QHAdam,
optim.QHM,
optim.RAdam,
optim.SGDP,
optim.SGDW,
optim.SWATS,
Expand All @@ -139,7 +135,6 @@ def test_weight_decay_validation(optimizer_class):
optim.Lamb,
optim.NovoGrad,
optim.QHAdam,
optim.RAdam,
optim.Yogi,
]

Expand Down
3 changes: 0 additions & 3 deletions torch_optimizer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from .pid import PID
from .qhadam import QHAdam
from .qhm import QHM
from .radam import RAdam
from .sgdp import SGDP
from .sgdw import SGDW
from .shampoo import Shampoo
Expand Down Expand Up @@ -67,7 +66,6 @@
'PID',
'QHAdam',
'QHM',
'RAdam',
'Ranger',
'RangerQH',
'RangerVA',
Expand Down Expand Up @@ -98,7 +96,6 @@
PID,
QHAdam,
QHM,
RAdam,
Ranger,
RangerQH,
RangerVA,
Expand Down
184 changes: 0 additions & 184 deletions torch_optimizer/radam.py

This file was deleted.