wfs123456 / CCTrans

Code Reproduction
55 stars 8 forks source link

'>' not supported between instances of 'type' and 'float'` ALTGVT #5

Closed zhou-rui1 closed 2 years ago

zhou-rui1 commented 2 years ago

Hello, thanks with your code, but I am confusing about this issue :

File "CCTrans-main/Networks/ALTGVT.py", line 563, in <module> model = alt_gvt_large(pretrained=True) File "CCTrans-main/Networks/ALTGVT.py", line 553, in alt_gvt_large **kwargs) File "CCTrans-main/Networks/ALTGVT.py", line 498, in __init__ norm_layer, depths, sr_ratios, block_cls) File "CCTrans-main/Networks/ALTGVT.py", line 485, in __init__ norm_layer, depths, sr_ratios, block_cls) File "CCTrans-main/Networks/ALTGVT.py", line 419, in __init__ sr_ratios, block_cls) File "CCTrans-main/Networks/ALTGVT.py", line 316, in __init__ for i in range(depths[k])]) File "CCTrans-main/Networks/ALTGVT.py", line 316, in <listcomp> for i in range(depths[k])]) File "CCTrans-main/Networks/ALTGVT.py", line 237, in __init__ drop_path, act_layer, norm_layer) File "lib/python3.7/site-packages/timm/models/vision_transformer.py", line 135, in __init__ self.drop_path = DropPath(drop_path) if drop_path > 0. else nn.Identity() TypeError: '>' not supported between instances of 'type' and 'float'

wfs123456 commented 2 years ago

Notice  the version of timm. It should be 0.3.2.

---Original--- From: @.> Date: Tue, Mar 22, 2022 14:44 PM To: @.>; Cc: @.***>; Subject: [wfs123456/CCTrans] '>' not supported between instances of 'type' and 'float'` ALTGVT (Issue #5)

Hello, thanks with your code, but I am confusing about this issue :

File "CCTrans-main/Networks/ALTGVT.py", line 563, in <module> model = alt_gvt_large(pretrained=True) File "CCTrans-main/Networks/ALTGVT.py", line 553, in alt_gvt_large **kwargs) File "CCTrans-main/Networks/ALTGVT.py", line 498, in init norm_layer, depths, sr_ratios, block_cls) File "CCTrans-main/Networks/ALTGVT.py", line 485, in init norm_layer, depths, sr_ratios, block_cls) File "CCTrans-main/Networks/ALTGVT.py", line 419, in init sr_ratios, block_cls) File "CCTrans-main/Networks/ALTGVT.py", line 316, in init for i in range(depths[k])]) File "CCTrans-main/Networks/ALTGVT.py", line 316, in <listcomp> for i in range(depths[k])]) File "CCTrans-main/Networks/ALTGVT.py", line 237, in init drop_path, act_layer, norm_layer) File "lib/python3.7/site-packages/timm/models/vision_transformer.py", line 135, in init self.drop_path = DropPath(drop_path) if drop_path > 0. else nn.Identity() TypeError: '>' not supported between instances of 'type' and 'float'

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>