@@ -440,8 +440,8 @@ def test_adam(self):
440440 )
441441 self ._test_basic_cases (
442442 lambda weight , bias : optimizer ([weight , bias ], lr = 1e-3 , amsgrad = True ),
443- [lambda opt : ExponentialLR (opt , gamma = 0.9 ),
444- lambda opt : WarmUpLR (opt , warmup_factor = 0.4 , warmup_iters = 4 , warmup_method = "constant" )]
443+ [lambda opt : WarmUpLR (opt , warmup_factor = 0.4 , warmup_iters = 4 , warmup_method = "constant" ),
444+ lambda opt : ExponentialLR (opt , gamma = 0.9 )]
445445 )
446446 self ._test_basic_cases (
447447 lambda weight , bias : optimizer ([weight , bias ], lr = 1e-3 , amsgrad = True ),
@@ -1294,8 +1294,8 @@ def test_compound_exp_and_linear_warmup_lr(self):
12941294 for i in range (iters ):
12951295 single_targets [i ] *= factor + i / iters * (1 - factor )
12961296 targets = [single_targets , [x * epochs for x in single_targets ]]
1297- schedulers [0 ] = ExponentialLR (self .opt , gamma = 0.9 )
1298- schedulers [1 ] = WarmUpLR (self .opt , warmup_factor = factor , warmup_iters = iters , warmup_method = "linear" )
1297+ schedulers [0 ] = WarmUpLR (self .opt , warmup_factor = factor , warmup_iters = iters , warmup_method = "linear" )
1298+ schedulers [1 ] = ExponentialLR (self .opt , gamma = 0.9 )
12991299 self ._test (schedulers , targets , epochs )
13001300
13011301 def test_compound_step_and_constant_warmup (self ):
@@ -1361,8 +1361,8 @@ def test_compound_cosanneal_and_linear_warmup_lr(self):
13611361 for i in range (iters ):
13621362 single_targets [i ] *= factor + i / iters * (1 - factor )
13631363 targets = [single_targets , [x * epochs for x in single_targets ]]
1364- schedulers [0 ] = CosineAnnealingLR (self .opt , T_max = epochs , eta_min = eta_min )
1365- schedulers [1 ] = WarmUpLR (self .opt , warmup_factor = factor , warmup_iters = iters , warmup_method = "linear" )
1364+ schedulers [0 ] = WarmUpLR (self .opt , warmup_factor = factor , warmup_iters = iters , warmup_method = "linear" )
1365+ schedulers [1 ] = CosineAnnealingLR (self .opt , T_max = epochs , eta_min = eta_min )
13661366 self ._test (schedulers , targets , epochs )
13671367
13681368 def test_compound_cosanneal_and_exp_lr (self ):
0 commit comments