@@ -58,7 +58,7 @@ def __init__(
58
58
verbose : bool = False ,
59
59
) -> None :
60
60
"""Initialize and record the necessary parameters"""
61
- super (LRBase , self ).__init__ ()
61
+ super ().__init__ ()
62
62
if warmup_epoch >= epochs :
63
63
msg = (
64
64
"When using warm up, the value of 'Global.epochs' should be greater "
@@ -124,7 +124,7 @@ class Constant(lr.LRScheduler):
124
124
def __init__ (self , learning_rate : float , last_epoch : int = - 1 ):
125
125
self .learning_rate = learning_rate
126
126
self .last_epoch = last_epoch
127
- super (Constant , self ).__init__ ()
127
+ super ().__init__ ()
128
128
129
129
def get_lr (self ) -> float :
130
130
"""always return the same learning rate"""
@@ -163,7 +163,7 @@ def __init__(
163
163
last_epoch : int = - 1 ,
164
164
by_epoch : bool = False ,
165
165
):
166
- super (Linear , self ).__init__ (
166
+ super ().__init__ (
167
167
epochs ,
168
168
iters_per_epoch ,
169
169
learning_rate ,
@@ -230,7 +230,7 @@ def __init__(
230
230
last_epoch : int = - 1 ,
231
231
by_epoch : bool = False ,
232
232
):
233
- super (ExponentialDecay , self ).__init__ (
233
+ super ().__init__ (
234
234
epochs ,
235
235
iters_per_epoch ,
236
236
learning_rate ,
@@ -291,7 +291,7 @@ def __init__(
291
291
last_epoch : int = - 1 ,
292
292
by_epoch : bool = False ,
293
293
):
294
- super (Cosine , self ).__init__ (
294
+ super ().__init__ (
295
295
epochs ,
296
296
iters_per_epoch ,
297
297
learning_rate ,
@@ -357,7 +357,7 @@ def __init__(
357
357
last_epoch : int = - 1 ,
358
358
by_epoch : bool = False ,
359
359
):
360
- super (Step , self ).__init__ (
360
+ super ().__init__ (
361
361
epochs ,
362
362
iters_per_epoch ,
363
363
learning_rate ,
@@ -418,7 +418,7 @@ def __init__(
418
418
last_epoch : int = - 1 ,
419
419
by_epoch : bool = False ,
420
420
):
421
- super (Piecewise , self ).__init__ (
421
+ super ().__init__ (
422
422
epochs ,
423
423
iters_per_epoch ,
424
424
values [0 ],
@@ -479,7 +479,7 @@ def __init__(
479
479
last_epoch : int = - 1 ,
480
480
by_epoch : bool = False ,
481
481
):
482
- super (MultiStepDecay , self ).__init__ (
482
+ super ().__init__ (
483
483
epochs ,
484
484
iters_per_epoch ,
485
485
learning_rate ,
@@ -538,9 +538,7 @@ def __init__(
538
538
self .T_mult = T_mult
539
539
self .eta_min = eta_min
540
540
self .T_cur = last_epoch
541
- super (CosineAnnealingWarmRestarts , self ).__init__ (
542
- learning_rate , last_epoch , verbose
543
- )
541
+ super ().__init__ (learning_rate , last_epoch , verbose )
544
542
545
543
def get_lr (self ):
546
544
return (
@@ -616,7 +614,7 @@ def __init__(
616
614
last_epoch : int = - 1 ,
617
615
by_epoch : bool = False ,
618
616
):
619
- super (CosineWarmRestarts , self ).__init__ (
617
+ super ().__init__ (
620
618
epochs ,
621
619
iters_per_epoch ,
622
620
learning_rate ,
0 commit comments