From d70668cb6f5cb71b93c7a045ef66127f67f1ef26 Mon Sep 17 00:00:00 2001 From: kuizhiqing Date: Tue, 6 Dec 2022 21:13:01 +0800 Subject: [PATCH] fix typo --- ppcls/arch/backbone/legendary_models/swin_transformer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ppcls/arch/backbone/legendary_models/swin_transformer.py b/ppcls/arch/backbone/legendary_models/swin_transformer.py index 50d781c9..19245953 100644 --- a/ppcls/arch/backbone/legendary_models/swin_transformer.py +++ b/ppcls/arch/backbone/legendary_models/swin_transformer.py @@ -86,8 +86,7 @@ class RollWrapperSingleton(): def __init__(self): self.index_dict = {} self.roll_with_index_select = RollWithIndexSelect.apply - if 'npu' in paddle.device.get_all_custom_device_type(): - self.enable = True + self.enable = True if 'npu' in paddle.device.get_all_custom_device_type() else False def __call__(self, x, shifts, axis): if not self.enable: -- GitLab