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 1
1
Changes
2
2
-------
3
3
4
+ 0.3.1 (YYYY-MM-DD)
5
+ ------------------
6
+ * Deprecate RAdam optimizer.
7
+
4
8
0.3.0 (2021-10-30)
5
9
------------------
6
10
* Revert for Drop RAdam.
Original file line number Diff line number Diff line change @@ -775,6 +775,8 @@ RAdam
775
775
| .. 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 |
776
776
+---------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
777
777
778
+ Deprecated, please use version provided by PyTorch _.
779
+
778
780
.. code :: python
779
781
780
782
import torch_optimizer as optim
Original file line number Diff line number Diff line change 79
79
# utils
80
80
'get' ,
81
81
)
82
- __version__ = '0.3.0 '
82
+ __version__ = '0.3.1a0 '
83
83
84
84
85
85
_package_opts = [
Original file line number Diff line number Diff line change 1
1
import math
2
+ import warnings
2
3
3
4
import torch
4
5
from torch .optim .optimizer import Optimizer
11
12
class RAdam (Optimizer ):
12
13
r"""Implements RAdam optimization algorithm.
13
14
15
+ Note:
16
+ Deprecated, please use version provided by PyTorch_.
17
+
14
18
It has been proposed in `On the Variance of the Adaptive Learning
15
19
Rate and Beyond`__.
16
20
@@ -45,6 +49,12 @@ def __init__(
45
49
eps : float = 1e-8 ,
46
50
weight_decay : float = 0 ,
47
51
) -> None :
52
+ warnings .warn (
53
+ 'RAdam optimizer is deprecated, since it is included '
54
+ 'in pytorch natively.' ,
55
+ DeprecationWarning ,
56
+ stacklevel = 2 ,
57
+ )
48
58
if lr <= 0.0 :
49
59
raise ValueError ('Invalid learning rate: {}' .format (lr ))
50
60
if eps < 0.0 :
You can’t perform that action at this time.
0 commit comments