Skip to content

Commit 3421b0e

Browse files
authored
docs: Add docstrings to public packages (#360)
* Add docstring to the aggregation package * Add docstring to the torchjd package
1 parent 6d799a3 commit 3421b0e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/torchjd/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
"""
2+
This package enable Jacobian descent, through the `backward` and `mtl_backward` functions, which
3+
are meant to replace the call to `torch.backward` or `loss.backward` in gradient descent. To combine
4+
the information of the Jacobian, an aggregator from the `aggregation` package has to be used.
5+
"""
6+
17
from ._autojac import backward, mtl_backward

src/torchjd/aggregation/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
"""
2+
This package provides implementations of several popular aggregation strategies from the literature.
3+
The role of these aggregators is to combine a matrix (e.g. the Jacobian matrix) into a single
4+
vector, generally to be used like a gradient.
5+
"""
6+
17
from ._aggregator_bases import Aggregator
28
from ._aligned_mtl import AlignedMTL
39
from ._config import ConFIG

0 commit comments

Comments
 (0)