Skip to content

Commit

Permalink
Fix offset in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
CeliaBenquet committed Sep 18, 2024
1 parent 7aab282 commit ffa66eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cebra/data/multi_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def configure_for(self, model: "cebra.models.Model"):
"""Configure the dataset offset for the provided model.
Call this function before indexing the dataset. This sets the
:py:attr:`cebra_data.Dataset.offset` attribute of the dataset.
:py:attr:`cebra.data.Dataset.offset` attribute of the dataset.
Args:
model: The model to configure the dataset for.
Expand Down
2 changes: 1 addition & 1 deletion cebra/data/single_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def configure_for(self, model: "cebra.models.Model"):
"""Configure the dataset offset for the provided model.
Call this function before indexing the dataset. This sets the
:py:attr:`cebra_data.Dataset.offset` attribute of the dataset.
:py:attr:`cebra.data.Dataset.offset` attribute of the dataset.
Args:
model: The model to configure the dataset for.
Expand Down
5 changes: 3 additions & 2 deletions cebra/solver/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,15 @@ def _check_indices(batch_start_idx: int, batch_end_idx: int,


def _add_batched_zero_padding(batched_data: torch.Tensor,
offset: cebra.data.Offset, batch_start_idx: int,
offset: cebra.data.Offset,
batch_start_idx: int,
batch_end_idx: int,
num_samples: int) -> torch.Tensor:
"""Add zero padding to the input data before inference.
Args:
batched_data: Data to apply the inference on.
offset (cebra.data.Offset): _description_
offset: Offset of the model to consider when padding.
batch_start_idx: Index of the first sample in the batch.
batch_end_idx: Index of the first sample in the batch.
num_samples (int): Total number of samples in the data.
Expand Down

0 comments on commit ffa66eb

Please sign in to comment.