Skip to content

additional info when the shapes don't match #3883

@wyli

Description

@wyli

Is your feature request related to a problem? Please describe.
shape checks such as

if y.shape != y_pred.shape:
raise ValueError("y_pred and y should have same shapes.")

should provide more details about the current shapes for better usability.

raise ValueError(f"y_pred and y should have same shapes, got {y_pred.shape} and {y.shape}.")

would be great to review all the error messages... cc @Project-MONAI/core-reviewers

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions