Skip to content

Commit 056b7e0

Browse files
committed
Fix outputs
1 parent 2c8a3cb commit 056b7e0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/torchjd/autojac/_jac.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ def jac(
6868
>>> jacobians = jac([y1, y2], param)
6969
>>>
7070
>>> jacobians
71-
(tensor([[-1., 1.],
72-
[ 2., 4.]]),)
71+
(tensor([[-1., 1.],
72+
[ 2., 4.]]),)
7373
7474
.. admonition::
7575
Example

src/torchjd/autojac/_jac_to_grad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def jac_to_grad(
105105
>>> param.grad
106106
tensor([0.5000, 2.5000])
107107
>>> weights
108-
tensor([0.5, 0.5])
108+
tensor([0.5000, 0.5000])
109109
110110
The ``.grad`` field of ``param`` now contains the aggregation (by UPGrad) of the Jacobian of
111111
:math:`\begin{bmatrix}y_1 \\ y_2\end{bmatrix}` with respect to ``param``. In this case, the

0 commit comments

Comments
 (0)