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 e73d2c9 commit 518a699Copy full SHA for 518a699
torchdrug/utils/decorator.py
@@ -59,10 +59,10 @@ def equal(x, y):
59
if self.training:
60
return forward(self, *args, **kwargs)
61
62
- forward = inspect.signature(forward)
63
- forward = forward.bind(self, *args, **kwargs)
64
- forward.apply_defaults()
65
- arguments = forward.arguments.copy()
+ sig = inspect.signature(forward)
+ func = sig.bind(self, *args, **kwargs)
+ func.apply_defaults()
+ arguments = func.arguments.copy()
66
arguments.pop(next(iter(arguments.keys())))
67
68
if hasattr(self, "_forward_cache"):
0 commit comments