From b68c5c5f8fee3faf3edbf2b8eb6fc9a4d2e9cc38 Mon Sep 17 00:00:00 2001 From: Z-Fran <1396925302@qq.com> Date: Thu, 22 Dec 2022 16:53:33 +0800 Subject: [PATCH] [Fix] fix restormer ut --- .../test_editors/test_restormer/test_restormer_net.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_models/test_editors/test_restormer/test_restormer_net.py b/tests/test_models/test_editors/test_restormer/test_restormer_net.py index d094052466..64624d825f 100644 --- a/tests/test_models/test_editors/test_restormer/test_restormer_net.py +++ b/tests/test_models/test_editors/test_restormer/test_restormer_net.py @@ -1,9 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. +import pytest import torch from mmedit.models.editors import Restormer +@pytest.mark.skipif( + torch.__version__ < '1.8.0', + reason='skip on torch<1.8 due to unsupported PixelUnShuffle') def test_restormer_cpu(): """Test Restormer.""" @@ -79,6 +83,9 @@ def test_restormer_cpu(): assert output.shape == (1, 3, 16, 16) +@pytest.mark.skipif( + torch.__version__ < '1.8.0', + reason='skip on torch<1.8 due to unsupported PixelUnShuffle') def test_restormer_cuda(): net = Restormer( inp_channels=3,