Skip to content

Commit

Permalink
Clarify error message
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Jan 9, 2025
1 parent d3beb52 commit ee8c49b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchvision/transforms/v2/_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _check_input(
raise TypeError(f"{name}={value} should be a single number or a sequence with length 2.")

if not bound[0] <= value[0] <= value[1] <= bound[1]:
raise ValueError(f"{name} values should be between {bound}, but got {value}.")
raise ValueError(f"{name} values should be between {bound} and increasing, but got {value}.")

return None if value[0] == value[1] == center else (float(value[0]), float(value[1]))

Expand Down

0 comments on commit ee8c49b

Please sign in to comment.