Skip to content

Commit edb58f1

Browse files
authored
fix(metrics): Corrected dimension count in MS-SSIM error message for 3D images. (#8685)
Fixes # . ### Description A few sentences describing the changes proposed in this pull request. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Akshat Sinha <akshatsinhasramhardy@gmail.com>
1 parent aeb485f commit edb58f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

monai/metrics/regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def compute_ms_ssim(
589589

590590
if spatial_dims == 3 and dims != 5:
591591
raise ValueError(
592-
f"y_pred should have 4 dimensions (batch, channel, height, width, depth) when using {spatial_dims}"
592+
f"y_pred should have 5 dimensions (batch, channel, height, width, depth) when using {spatial_dims}"
593593
f" spatial dimensions, got {dims}."
594594
)
595595

0 commit comments

Comments
 (0)