@@ -66,8 +66,9 @@ def __init__(
6666 averages used for adaptive weighting are reset at the start of each
6767 epoch. Setting this parameter to ``False`` can improve training
6868 stability, especially when data are scarce. Default is ``True``.
69- :raise ValueError: If the provided loss function is not compatible.
70- :raise ValueError: If ``reset_weights_at_epoch_start`` is not a boolean.
69+ :raises ValueError: If the provided loss function is not compatible.
70+ :raises ValueError: If ``reset_weights_at_epoch_start`` is not a
71+ boolean.
7172 """
7273 super ().__init__ (
7374 problem = problem ,
@@ -147,7 +148,7 @@ def loss_autoregressive(
147148 :param input: The input tensor containing unroll windows.
148149 :type input: torch.Tensor | LabelTensor
149150 :param dict kwargs: Additional keyword arguments for loss computation.
150- :raise ValueError: If ``input`` has less than 4 dimensions.
151+ :raises ValueError: If ``input`` has less than 4 dimensions.
151152 :return: The scalar loss value for the given batch.
152153 :rtype: torch.Tensor | LabelTensor
153154 """
@@ -270,7 +271,7 @@ def predict(self, initial_state, n_steps, **kwargs):
270271 :type initial_state: torch.Tensor | LabelTensor
271272 :param int n_steps: The number of autoregressive steps to predict.
272273 :param dict kwargs: Additional keyword arguments.
273- :raise ValueError: If the provided initial_state tensor has less than 3
274+ :raises ValueError: If the provided initial_state tensor has less than 3
274275 dimensions.
275276 :return: The predicted trajectory, including the initial state. It has
276277 shape ``[trajectories, n_steps + 1, *features]``, where the first
@@ -320,8 +321,8 @@ def unroll(data, unroll_length, n_unrolls=None, randomize=True):
320321 If ``None``, all valid windows are returned. Default is ``None``.
321322 :param bool randomize: If ``True``, starting indices are randomly
322323 permuted before applying ``n_unrolls``. Default is ``True``.
323- :raise ValueError: If the input ``data`` has less than 3 dimensions.
324- :raise ValueError: If ``unroll_length`` is greater or equal to the
324+ :raises ValueError: If the input ``data`` has less than 3 dimensions.
325+ :raises ValueError: If ``unroll_length`` is greater or equal to the
325326 number of time steps in ``data``.
326327 :return: A tensor of unrolled windows.
327328 :rtype: torch.Tensor | LabelTensor
@@ -358,7 +359,7 @@ def _get_start_idx(n_steps, unroll_length, n_unrolls=None, randomize=True):
358359 If ``None``, all valid windows are returned. Default is ``None``.
359360 :param bool randomize: If ``True``, starting indices are randomly
360361 permuted before applying ``n_unrolls``. Default is ``True``.
361- :raise ValueError: If ``unroll_length`` is greater or equal to the
362+ :raises ValueError: If ``unroll_length`` is greater or equal to the
362363 number of time steps in ``data``.
363364 :return: A tensor of starting indices for unroll windows.
364365 :rtype: torch.Tensor
0 commit comments