File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed
Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 11Changes
22-------
33
4+ 0.3.1 (YYYY-MM-DD)
5+ ------------------
6+ * Deprecate RAdam optimizer.
7+
480.3.0 (2021-10-30)
59------------------
610* Revert for Drop RAdam.
Original file line number Diff line number Diff line change @@ -775,6 +775,8 @@ RAdam
775775| .. 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 |
776776+---------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
777777
778+ Deprecated, please use version provided by PyTorch _.
779+
778780.. code :: python
779781
780782 import torch_optimizer as optim
Original file line number Diff line number Diff line change 7979 # utils
8080 'get' ,
8181)
82- __version__ = '0.3.0 '
82+ __version__ = '0.3.1a0 '
8383
8484
8585_package_opts = [
Original file line number Diff line number Diff line change 11import math
2+ import warnings
23
34import torch
45from torch .optim .optimizer import Optimizer
1112class RAdam (Optimizer ):
1213 r"""Implements RAdam optimization algorithm.
1314
15+ Note:
16+ Deprecated, please use version provided by PyTorch_.
17+
1418 It has been proposed in `On the Variance of the Adaptive Learning
1519 Rate and Beyond`__.
1620
@@ -45,6 +49,12 @@ def __init__(
4549 eps : float = 1e-8 ,
4650 weight_decay : float = 0 ,
4751 ) -> None :
52+ warnings .warn (
53+ 'RAdam optimizer is deprecated, since it is included '
54+ 'in pytorch natively.' ,
55+ DeprecationWarning ,
56+ stacklevel = 2 ,
57+ )
4858 if lr <= 0.0 :
4959 raise ValueError ('Invalid learning rate: {}' .format (lr ))
5060 if eps < 0.0 :
You can’t perform that action at this time.
0 commit comments