-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: '>' not supported between instances of 'type' and 'float' #24
Comments
timm版本不对把
…---Original---
From: ***@***.***>
Date: Sat, Mar 4, 2023 21:10 PM
To: ***@***.***>;
Cc: ***@***.***>;
Subject: [wfs123456/CCTrans] TypeError: '>' not supported between instances of'type' and 'float' (Issue #24)
作者你好,可以帮我看一下这个问题要如何解决吗?
CUDA_DEVICE_ORDER=PCI_BUS_ID
CUDA_VISIBLE_DEVICES=0
number of img [train]: 0
number of img [val]: 13
2023-03-04 21:08:32,599 - INFO - data_dir : ./ShanghaiTech/ShanghaiTech/part_A_final
2023-03-04 21:08:32,599 - INFO - dataset : sha
2023-03-04 21:08:32,600 - INFO - lr : 1e-05
2023-03-04 21:08:32,600 - INFO - weight_decay : 0.0001
2023-03-04 21:08:32,600 - INFO - resume :
2023-03-04 21:08:32,600 - INFO - max_epoch : 4000
2023-03-04 21:08:32,600 - INFO - val_epoch : 1
2023-03-04 21:08:32,600 - INFO - val_start : 0
2023-03-04 21:08:32,600 - INFO - batch_size : 16
2023-03-04 21:08:32,600 - INFO - device : 0
2023-03-04 21:08:32,601 - INFO - num_workers : 16
2023-03-04 21:08:32,601 - INFO - crop_size : 256
2023-03-04 21:08:32,601 - INFO - wot : 0.1
2023-03-04 21:08:32,601 - INFO - wtv : 0.01
2023-03-04 21:08:32,601 - INFO - reg : 10.0
2023-03-04 21:08:32,601 - INFO - num_of_iter_in_ot: 100
2023-03-04 21:08:32,601 - INFO - norm_cood : 0
2023-03-04 21:08:32,601 - INFO - run_name : CCTrans
2023-03-04 21:08:32,601 - INFO - wandb : 0
2023-03-04 21:08:32,728 - INFO - using 1 gpus
Traceback (most recent call last):
File "train.py", line 67, in
trainer.setup()
File "/share/home/wut_pansk/CCTrains/train_helper_ALTGVT.py", line 123, in setup
self.model = ALTGVT.alt_gvt_large(pretrained=True)
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 555, in alt_gvt_large
model = ALTGVT(
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 502, in init
super(ALTGVT, self).init(img_size, patch_size, in_chans, num_classes, embed_dims, num_heads,
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 489, in init
super(PCPVT, self).init(img_size, patch_size, in_chans, num_classes, embed_dims, num_heads,
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 423, in init
super(CPVTV2, self).init(img_size, patch_size, in_chans, num_classes, embed_dims, num_heads, mlp_ratios,
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 315, in init
_block = nn.ModuleList([
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 316, in
block_cls(
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 242, in init
super(GroupBlock, self).init(dim, num_heads, mlp_ratio, qkv_bias, drop, attn_drop,
File "/share/home/wut_pansk/.conda/envs/psk/lib/python3.8/site-packages/timm/models/vision_transformer.py", line 260, in init
self.drop_path1 = 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: ***@***.***>
|
谢谢作者的解答,解决好啦 |
请问你是把timm包降低版本了还是修改代码了,我也是遇到这个问题了 |
我安装为timm==0.4.12就好了
***@***.***
…---- Replied Message ----
From
***@***.***>
Date
3/7/2023 22:07
To
***@***.***>
Cc
***@***.***>
,
***@***.***>
Subject
Re: [wfs123456/CCTrans] TypeError: '>' not supported between instances of 'type' and 'float' (Issue #24)
请问你是把timm包降低版本了还是修改代码了,我也是遇到这个问题了
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
作者你好,可以帮我看一下这个问题要如何解决吗?
CUDA_DEVICE_ORDER=PCI_BUS_ID
CUDA_VISIBLE_DEVICES=0
number of img [train]: 0
number of img [val]: 13
2023-03-04 21:08:32,599 - INFO - data_dir : ./ShanghaiTech/ShanghaiTech/part_A_final
2023-03-04 21:08:32,599 - INFO - dataset : sha
2023-03-04 21:08:32,600 - INFO - lr : 1e-05
2023-03-04 21:08:32,600 - INFO - weight_decay : 0.0001
2023-03-04 21:08:32,600 - INFO - resume :
2023-03-04 21:08:32,600 - INFO - max_epoch : 4000
2023-03-04 21:08:32,600 - INFO - val_epoch : 1
2023-03-04 21:08:32,600 - INFO - val_start : 0
2023-03-04 21:08:32,600 - INFO - batch_size : 16
2023-03-04 21:08:32,600 - INFO - device : 0
2023-03-04 21:08:32,601 - INFO - num_workers : 16
2023-03-04 21:08:32,601 - INFO - crop_size : 256
2023-03-04 21:08:32,601 - INFO - wot : 0.1
2023-03-04 21:08:32,601 - INFO - wtv : 0.01
2023-03-04 21:08:32,601 - INFO - reg : 10.0
2023-03-04 21:08:32,601 - INFO - num_of_iter_in_ot: 100
2023-03-04 21:08:32,601 - INFO - norm_cood : 0
2023-03-04 21:08:32,601 - INFO - run_name : CCTrans
2023-03-04 21:08:32,601 - INFO - wandb : 0
2023-03-04 21:08:32,728 - INFO - using 1 gpus
Traceback (most recent call last):
File "train.py", line 67, in
trainer.setup()
File "/share/home/wut_pansk/CCTrains/train_helper_ALTGVT.py", line 123, in setup
self.model = ALTGVT.alt_gvt_large(pretrained=True)
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 555, in alt_gvt_large
model = ALTGVT(
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 502, in init
super(ALTGVT, self).init(img_size, patch_size, in_chans, num_classes, embed_dims, num_heads,
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 489, in init
super(PCPVT, self).init(img_size, patch_size, in_chans, num_classes, embed_dims, num_heads,
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 423, in init
super(CPVTV2, self).init(img_size, patch_size, in_chans, num_classes, embed_dims, num_heads, mlp_ratios,
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 315, in init
_block = nn.ModuleList([
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 316, in
block_cls(
File "/share/home/wut_pansk/CCTrains/Networks/ALTGVT.py", line 242, in init
super(GroupBlock, self).init(dim, num_heads, mlp_ratio, qkv_bias, drop, attn_drop,
File "/share/home/wut_pansk/.conda/envs/psk/lib/python3.8/site-packages/timm/models/vision_transformer.py", line 260, in init
self.drop_path1 = DropPath(drop_path) if drop_path > 0. else nn.Identity()
TypeError: '>' not supported between instances of 'type' and 'float'
The text was updated successfully, but these errors were encountered: