Skip to content

Commit 9e7536e

Browse files
committed
update: test_lomo_optimizer
1 parent dd708b8 commit 9e7536e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_optimizers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,13 +464,13 @@ def test_lomo_fused_backward(environment):
464464

465465

466466
@pytest.mark.parametrize('precision', [16, 32])
467-
def test_lomo_grad_norm(precision, environment):
467+
def test_lomo_optimizer(precision, environment):
468468
_, model, _ = environment
469469

470470
if precision == 16:
471471
model.fc1.weight.data = torch.randn(2, 2, dtype=torch.float16)
472472

473-
optimizer = load_optimizer('lomo')(model, clip_grad_norm=1.0)
473+
optimizer = load_optimizer('lomo')(model, clip_grad_norm=1.0, clip_grad_value=1.0)
474474

475475
if precision == 16:
476476
optimizer.clip_coef = 0.9

0 commit comments

Comments
 (0)