Skip to content

Commit 296b3ac

Browse files
committed
Simplify compute_gramian documentation
1 parent f579ce7 commit 296b3ac

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/torchjd/autogram/_engine.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,10 @@ def _check_module_is_compatible(module: nn.Module) -> None:
162162

163163
def compute_gramian(self, output: Tensor) -> Tensor:
164164
"""
165-
Compute the Gramian of the Jacobian of `output` with respect the direct parameters of all
166-
`modules`.
165+
Compute the Gramian of the Jacobian of ``output`` with respect the direct parameters of all
166+
``modules``.
167167
168-
:param output: The vector to differentiate. Must have `ndim == 1`.
169-
:returns: the Gramian of the Jacobian of `output` with respect to the direct parameters of
170-
all `modules`
168+
:param output: The vector to differentiate. Must be a 1-D tensor.
171169
"""
172170

173171
reshaped_output = output.reshape([-1])

0 commit comments

Comments
 (0)