From ee8c49be620363965200c9644c6e69f0bf964a86 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 9 Jan 2025 17:27:02 +0000 Subject: [PATCH] Clarify error message --- torchvision/transforms/v2/_color.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchvision/transforms/v2/_color.py b/torchvision/transforms/v2/_color.py index 7a471e7c1f6..2ee83e72a41 100644 --- a/torchvision/transforms/v2/_color.py +++ b/torchvision/transforms/v2/_color.py @@ -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]))