Skip to content

Commit d70668c

Browse files
kuizhiqingweisy11
authored andcommitted
fix typo
1 parent a37cee7 commit d70668c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ppcls/arch/backbone/legendary_models/swin_transformer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ class RollWrapperSingleton():
8686
def __init__(self):
8787
self.index_dict = {}
8888
self.roll_with_index_select = RollWithIndexSelect.apply
89-
if 'npu' in paddle.device.get_all_custom_device_type():
90-
self.enable = True
89+
self.enable = True if 'npu' in paddle.device.get_all_custom_device_type() else False
9190

9291
def __call__(self, x, shifts, axis):
9392
if not self.enable:

0 commit comments

Comments
 (0)