Skip to content

Commit d742ba8

Browse files
committed
* Remove check that is impossible to fail in _reshape_matrices
1 parent ebb62d6 commit d742ba8

File tree

1 file changed

+0
-5
lines changed
  • src/torchjd/autojac/_transform

1 file changed

+0
-5
lines changed

src/torchjd/autojac/_transform/jac.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,4 @@ def _extract_sub_matrices(matrix: Tensor, lengths: Sequence[int]) -> list[Tensor
122122

123123

124124
def _reshape_matrices(matrices: Sequence[Tensor], shapes: Sequence[Size]) -> Sequence[Tensor]:
125-
if len(matrices) != len(shapes):
126-
raise ValueError(
127-
"Parameters `matrices` and `shapes` should contain the same number of elements."
128-
)
129-
130125
return [matrix.view((matrix.shape[0],) + shape) for matrix, shape in zip(matrices, shapes)]

0 commit comments

Comments
 (0)