Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/torchjd/aggregation/graddrop.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def _check_matrix_has_enough_rows(self, matrix: Tensor) -> None:
n_rows = matrix.shape[0]
if self.leak is not None and n_rows != len(self.leak):
raise ValueError(
f"Parameter `matrix` should be a matrix of at least {len(self.leak)} rows "
f"(i.e. the number of leak scalars). Found `matrix` of shape `{matrix.shape}`."
f"Parameter `matrix` should be a matrix of exactly {len(self.leak)} rows (i.e. the "
f"number of leak scalars). Found `matrix` of shape `{matrix.shape}`."
)

def __repr__(self) -> str:
Expand Down