Merge pull request #44 from JackKelly/patch-1

Use collections.abc.Callable
This commit is contained in:
Less Wright
2022-05-06 10:24:24 -07:00
committed by GitHub
+1 -1
View File
@@ -575,7 +575,7 @@ class Ranger21(TO.Optimizer):
def step(self, closure=None):
loss = None
if closure is not None and isinstance(closure, collections.Callable):
if closure is not None and isinstance(closure, collections.abc.Callable):
with torch.enable_grad():
loss = closure()