We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b0052f commit bda6532Copy full SHA for bda6532
tests/test_optimizers.py
@@ -476,8 +476,10 @@ def test_soap_parameters(params):
476
for _ in range(2):
477
optimizer.zero_grad()
478
479
- model[0].weight.grad = None
480
- model[1].weight.grad = torch.randn((1, 8))
+ model[0].weight.grad = torch.zeros((8, 2))
+ model[0].bias.grad = torch.zeros((8,))
481
+ model[1].weight.grad = torch.zeros((1, 8))
482
+ model[1].bias.grad = torch.zeros((1,))
483
484
optimizer.step()
485
0 commit comments