Skip to content

Commit c599541

Browse files
committed
update: ranger21 recipe
1 parent 3ece36d commit c599541

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/constants.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,11 @@
493493
(Lamb, {'lr': 1e0, 'weight_decay': 1e-3, 'rectify': True, 'adam_debias': True}, 30),
494494
(RAdam, {'lr': 1e0, 'weight_decay': 1e-3, 'adam_debias': True}, 25),
495495
(Ranger, {'lr': 5e0, 'weight_decay': 1e-3, 'adam_debias': True}, 50),
496-
(Ranger21, {'lr': 1e0, 'weight_decay': 1e-3, 'adam_debias': True, 'num_iterations': 125}, 125),
496+
(
497+
Ranger21,
498+
{'lr': 5e-1, 'weight_decay': 1e-3, 'adam_debias': True, 'num_iterations': 125, 'disable_lr_scheduler': True},
499+
125,
500+
),
497501
(AdaPNM, {'lr': 1e0, 'weight_decay': 1e-3, 'adam_debias': True}, 10),
498502
(NovoGrad, {'lr': 1e0, 'weight_decay': 1e-3, 'adam_debias': True}, 5),
499503
(AdaNorm, {'lr': 1e0, 'weight_decay': 1e-3, 'adam_debias': True}, 5),

tests/test_optimizers.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,6 @@ def test_adanorm_optimizer(optimizer_config, environment):
270270
(x_data, y_data), model, loss_fn = environment
271271

272272
optimizer_class, config, num_iterations = optimizer_config
273-
if optimizer_class.__name__ == 'Ranger21':
274-
config.update({'num_iterations': num_iterations, 'disable_lr_scheduler': True})
275273

276274
optimizer = optimizer_class(model.parameters(), **config)
277275

@@ -311,8 +309,6 @@ def test_adamd_optimizers(optimizer_config, environment):
311309
(x_data, y_data), model, loss_fn = environment
312310

313311
optimizer_class, config, num_iterations = optimizer_config
314-
if optimizer_class.__name__ == 'Ranger21':
315-
config.update({'num_iterations': num_iterations})
316312

317313
optimizer = optimizer_class(model.parameters(), **config)
318314

0 commit comments

Comments
 (0)