diff --git a/src/deepali/losses/image.py b/src/deepali/losses/image.py index e0576c8..85cdb6b 100644 --- a/src/deepali/losses/image.py +++ b/src/deepali/losses/image.py @@ -272,9 +272,9 @@ def __init__( raise ValueError( f"{type(self).__name__}() 'num_samples' must be positive integral value" ) - if sample_ratio is not None and (sample_ratio <= 0 or sample_ratio >= 1): + if sample_ratio is not None and (sample_ratio <= 0 or sample_ratio > 1): raise ValueError( - f"{type(self).__name__}() 'sample_ratio' must be in closed interval [0, 1]" + f"{type(self).__name__}() 'sample_ratio' must be in open-closed interval (0, 1]" ) super().__init__()