From e7da205345dcf770ee4bedd62d06fad7a1458904 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Sat, 10 Dec 2022 16:43:28 -0800 Subject: [PATCH] Fix aa min_max level clamp --- timm/data/auto_augment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timm/data/auto_augment.py b/timm/data/auto_augment.py index e461f67c..a7701b82 100644 --- a/timm/data/auto_augment.py +++ b/timm/data/auto_augment.py @@ -228,7 +228,7 @@ def _minmax_level_to_arg(level, _hparams, min_val=0., max_val=1.0, clamp=True): level = (level / _LEVEL_DENOM) min_val + (max_val - min_val) * level if clamp: - level = min(min_val, max(max_val, level)) + level = max(min_val, min(max_val, level)) return level,