|
4 | 4 |
|
5 | 5 | from torch import Tensor |
6 | 6 |
|
7 | | -from torchjd.aggregation._mixins import Stateful |
| 7 | +from torchjd._mixins import Stateful |
8 | 8 |
|
9 | 9 | from ._weighting_bases import Weighting |
10 | 10 |
|
|
13 | 13 |
|
14 | 14 | class CRMOGMWeighting(Weighting[_T], Stateful): |
15 | 15 | r""" |
16 | | - :class:`~torchjd.aggregation._mixins.Stateful` |
| 16 | + :class:`~torchjd.Stateful` |
17 | 17 | :class:`~torchjd.aggregation._weighting_bases.Weighting` that wraps another |
18 | 18 | :class:`~torchjd.aggregation._weighting_bases.Weighting` and stabilises the weights it |
19 | 19 | produces with an exponential moving average (EMA) across calls. This is the weight-smoothing |
@@ -61,7 +61,7 @@ class CRMOGMWeighting(Weighting[_T], Stateful): |
61 | 61 |
|
62 | 62 | This weighting is stateful: it keeps :math:`\lambda_{k-1}` across calls. Use :meth:`reset` |
63 | 63 | to restart the smoothing from the initial state. Note that calling :meth:`reset` will also |
64 | | - reset the wrapped weighting if it is :class:`~torchjd.aggregation.Stateful`. |
| 64 | + reset the wrapped weighting if it is :class:`~torchjd.Stateful`. |
65 | 65 |
|
66 | 66 | :param weighting: The wrapped weighting whose output is smoothed. |
67 | 67 | :param alpha: EMA coefficient on the previous weights. ``alpha=0`` disables smoothing |
@@ -120,7 +120,7 @@ def alpha(self, value: float) -> None: |
120 | 120 | def reset(self) -> None: |
121 | 121 | r""" |
122 | 122 | Clears the EMA state so the next forward restarts from the initial state. Also resets the |
123 | | - wrapped weighting if it is :class:`~torchjd.aggregation._mixins.Stateful`. |
| 123 | + wrapped weighting if it is :class:`~torchjd.Stateful`. |
124 | 124 | """ |
125 | 125 |
|
126 | 126 | if isinstance(self.weighting, Stateful): |
|
0 commit comments