Skip to content

Commit 45c068a

Browse files
committed
* Remove creation of variable used only once
1 parent f9c01a7 commit 45c068a

File tree

1 file changed

+1
-2
lines changed
  • src/torchjd/autojac/_transform

1 file changed

+1
-2
lines changed

src/torchjd/autojac/_transform/jac.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ def _differentiate(self, jac_outputs: Sequence[Tensor]) -> tuple[Tensor, ...]:
4343
if len(inputs) == 0:
4444
return tuple()
4545

46-
n_outputs = len(outputs)
47-
if n_outputs == 0:
46+
if len(outputs) == 0:
4847
return tuple(
4948
[
5049
torch.empty((0,) + input.shape, device=input.device, dtype=input.dtype)

0 commit comments

Comments
 (0)