mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix unused Python variables in test/[e-z]* (#136964)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136964 Approved by: https://github.com/justinchuby, https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
d298bd840f
commit
d8c8ba2440
@ -1275,7 +1275,6 @@ class TestOptimRenewed(TestCase):
|
||||
torch.randn(2, 3, requires_grad=False, device=device, dtype=dtype)
|
||||
for _ in range(2)
|
||||
]
|
||||
old_params = [p.detach().clone() for p in params]
|
||||
|
||||
def closure():
|
||||
return torch.tensor([1], device=device, dtype=dtype)
|
||||
@ -1632,7 +1631,6 @@ class TestOptimRenewed(TestCase):
|
||||
return closure_loss if optim_info.step_requires_closure else None
|
||||
|
||||
for optim_input in all_optim_inputs:
|
||||
kwargs = optim_input.kwargs
|
||||
optimizer = optim_cls(params, **optim_input.kwargs)
|
||||
for _ in range(3):
|
||||
optimizer.step(closure)
|
||||
|
Reference in New Issue
Block a user