Skip to content

Commit 1650a60

Browse files
committed
Same but for Differentiate subclasses
1 parent 20e9cf6 commit 1650a60

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/torchjd/autojac/_transform/_grad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
):
3535
super().__init__(outputs, inputs, retain_graph, create_graph)
3636

37-
def _differentiate(self, grad_outputs: Sequence[Tensor]) -> tuple[Tensor, ...]:
37+
def _differentiate(self, grad_outputs: Sequence[Tensor], /) -> tuple[Tensor, ...]:
3838
"""
3939
Computes the gradient of each output element with respect to each input tensor, and applies
4040
the linear transformations represented by the grad_outputs to the results.

src/torchjd/autojac/_transform/_jac.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(
4242
super().__init__(outputs, inputs, retain_graph, create_graph)
4343
self.chunk_size = chunk_size
4444

45-
def _differentiate(self, jac_outputs: Sequence[Tensor]) -> tuple[Tensor, ...]:
45+
def _differentiate(self, jac_outputs: Sequence[Tensor], /) -> tuple[Tensor, ...]:
4646
"""
4747
Computes the jacobian of each output with respect to each input, and applies the linear
4848
transformations represented by the jac_outputs to the results.

0 commit comments

Comments
 (0)