File tree 1 file changed +5
-5
lines changed
pytorch_optimizer/optimizer
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ class AdamG(BaseOptimizer):
24
24
def __init__ (
25
25
self ,
26
26
params : PARAMETERS ,
27
- lr : float = 1e-3 ,
27
+ lr : float = 1.0 ,
28
28
betas : BETAS = (0.95 , 0.999 , 0.95 ),
29
- p : float = 0.5 ,
29
+ p : float = 0.2 ,
30
30
q : float = 0.24 ,
31
31
weight_decay : float = 0.0 ,
32
32
weight_decouple : bool = False ,
@@ -88,8 +88,8 @@ def step(self, closure: CLOSURE = None) -> LOSS:
88
88
89
89
beta1 , beta2 , beta3 = group ['betas' ]
90
90
91
- bias_correction1 : float = 1.0 - self .debias (beta1 , group ['step' ])
92
- bias_correction2 : float = 1.0 - self .debias (beta2 , group ['step' ])
91
+ bias_correction1 : float = self .debias (beta1 , group ['step' ])
92
+ bias_correction2 : float = self .debias (beta2 , group ['step' ])
93
93
step_size : float = min (group ['lr' ], 1.0 / math .sqrt (group ['step' ]))
94
94
95
95
for p in group ['params' ]:
@@ -125,4 +125,4 @@ def step(self, closure: CLOSURE = None) -> LOSS:
125
125
126
126
p .add_ (update , alpha = - step_size )
127
127
128
- return loss
128
+ return loss
You can’t perform that action at this time.
0 commit comments