From 8de2721d64a98b56a423b46e3b4a27857158e05e Mon Sep 17 00:00:00 2001 From: LeoXing1996 Date: Thu, 19 Jan 2023 10:28:10 +0800 Subject: [PATCH] [Fix] skip restorer's unit test when torch <= 1.5.1 (#1607) skip restorer's unit test when torch <= 1.5.1 --- tests/test_models/test_restorers/test_basic_restorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_models/test_restorers/test_basic_restorer.py b/tests/test_models/test_restorers/test_basic_restorer.py index 78e415e021..30f4eb9d19 100644 --- a/tests/test_models/test_restorers/test_basic_restorer.py +++ b/tests/test_models/test_restorers/test_basic_restorer.py @@ -140,7 +140,7 @@ def test_basic_restorer(): # evaluation with metrics must have gt images restorer(lq=inputs, test_mode=True) - if version.parse(torch.__version__) <= version.parse('1.5.1'): + if version.parse(torch.__version__) > version.parse('1.5.1'): with tempfile.TemporaryDirectory() as tmpdir: outputs = restorer( **data_batch,