GuangxingHan / FCT

Code for CVPR 2022 Oral paper: 'Few-Shot Object Detection with Fully Cross-Transformer'
72 stars 13 forks source link

why occur this problem? could you help me to see it? #4

Open SamXiaosheng opened 1 year ago

SamXiaosheng commented 1 year ago

File "/data/sam/FCT-main/faster_rcnn_train_net.py", line 85, in main return trainer.train() File "/data/anaconda3/envs/py37_dr2/lib/python3.7/site-packages/detectron2/engine/defaults.py", line 484, in train super().train(self.start_iter, self.max_iter) File "/data/anaconda3/envs/py37_dr2/lib/python3.7/site-packages/detectron2/engine/train_loop.py", line 149, in train self.run_step() File "/data/anaconda3/envs/py37_dr2/lib/python3.7/site-packages/detectron2/engine/defaults.py", line 494, in run_step self._trainer.run_step() File "/data/anaconda3/envs/py37_dr2/lib/python3.7/site-packages/detectron2/engine/train_loop.py", line 294, in run_step self.optimizer.step() File "/data/anaconda3/envs/py37_dr2/lib/python3.7/site-packages/torch/optim/lr_scheduler.py", line 65, in wrapper return wrapped(*args, kwargs) File "/data/anaconda3/envs/py37_dr2/lib/python3.7/site-packages/torch/optim/optimizer.py", line 88, in wrapper return func(*args, *kwargs) File "/data/anaconda3/envs/py37_dr2/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context return func(args, kwargs) File "/data/anaconda3/envs/py37_dr2/lib/python3.7/site-packages/torch/optim/adamw.py", line 148, in step eps=group['eps']) File "/data/anaconda3/envs/py37_dr2/lib/python3.7/site-packages/torch/optim/functional.py", line 125, in adamw param.mul(1 - lr weight_decay) TypeError: unsupported operand type(s) for : 'float' and 'NoneType'

GuangxingHan commented 1 year ago

Thanks for your interest in our work. Could you provide more information here to better understand what happened in your case? (1) the version of Detectron you are using (2) which script are you running, and did you make any changes to the default config/source-code files? (3) how many iterations does the process take to report this error?

SamXiaosheng commented 1 year ago

(1)Detectron is 0.6;(2)i use this script single_branch_pretraining_coco_pvt_v2_b2_li.sh,whose content prints as follows: CUDA_VISIBLE_DEVICES=0,1,2,3,4,5 python3 faster_rcnn_train_net.py --num-gpus 6 --dist-url auto \ --config-file configs/fsod/single_branch_pretraining_coco_pvt_v2_b2_li.yaml 2>&1 | tee log/single_branch_pretraining_coco_pvt_v2_b2_li.txt (3)after the iter 0, i note the output information with "lr:N/A",is it possible for my quetion? 

------------------ 原始邮件 ------------------ 发件人: "GuangxingHan/FCT" @.>; 发送时间: 2022年11月14日(星期一) 晚上11:14 @.>; 抄送: "生second @.**@.>; 主题: Re: [GuangxingHan/FCT] why occur this problem? could you help me to see it? (Issue #4)

Thanks for your interest in our work. Could you provide more information here to better understand what happened in your case? (1) the version of Detectron you are using (2) which script are you running, and did you make any changes to the default config/source-code files? (3) how many iterations does the process take to report this error?

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

GuangxingHan commented 1 year ago

Thanks. Can you double check the value of lr and weight_decay in your log? According to the error here, one of them is NoneType. It is weird. Another possible reason is the version of Detectron2. We used detectron 0.2.1 in this project. Higher versions might have unknown issues of compatibility.

SamXiaosheng commented 1 year ago

detectron2 0.2.1version supports the pytorch is too lower,i want to install pytorch1.10.1, i have to choose higher version for detectron2

发自我的iPhone

------------------ Original ------------------ From: Guangxing Han @.> Date: Mon,Nov 14,2022 11:40 PM To: GuangxingHan/FCT @.> Cc: Sam @.>, Author @.> Subject: Re: [GuangxingHan/FCT] why occur this problem? could you help me tosee it? (Issue #4)

Thanks. Can you double check the value of lr and weight_decay in your log? According to the error here, one of them is NoneType. It is weird. Another possible reason is the version of Detectron2. We used detectron 0.2.1 in this project. Higher versions might have unknown issues of compatibility.

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

GuangxingHan commented 1 year ago

I see. You might need to align the config files with the higher version detectron2. I have not done this before. Sorry about this. By the way, are the value of lr and weight_decay normal in your program. It seems that the direct cause is that the program does not get a float value. Perhaps it was treated as a string type variable or others.

SamXiaosheng commented 1 year ago

Thanks for your help,i will try to do it today!

------------------ 原始邮件 ------------------ 发件人: "Guangxing @.>; 发送时间: 2022年11月15日(星期二) 凌晨0:17 收件人: @.>; 抄送: "生second @.>; @.>; 主题: Re: [GuangxingHan/FCT] why occur this problem? could you help me to see it? (Issue #4)

I see. You might need to align the config files with the higher detectron2. I have not done this before. Sorry about this. By the way, are the value of lr and weight_decay normal in your program. It seems that the direct cause is that the program does not get a float value. Perhaps it was treated as a string type variable or other types.

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

SamXiaosheng commented 1 year ago

i directly make the version of Detectron2 from 0.6 to 0.2.1,and your project is working now ! 

------------------ 原始邮件 ------------------ 发件人: "GuangxingHan/FCT" @.>; 发送时间: 2022年11月15日(星期二) 凌晨0:17 @.>; 抄送: "生second @.**@.>; 主题: Re: [GuangxingHan/FCT] why occur this problem? could you help me to see it? (Issue #4)

I see. You might need to align the config files with the higher detectron2. I have not done this before. Sorry about this. By the way, are the value of lr and weight_decay normal in your program. It seems that the direct cause is that the program does not get a float value. Perhaps it was treated as a string type variable or other types.

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

Bitdopad commented 1 year ago

i directly make the version of Detectron2 from 0.6 to 0.2.1,and your project is working now !  ------------------ 原始邮件 ------------------ 发件人: "GuangxingHan/FCT" @.>; 发送时间: 2022年11月15日(星期二) 凌晨0:17 @.>; 抄送: "生second @.**@.>; 主题: Re: [GuangxingHan/FCT] why occur this problem? could you help me to see it? (Issue #4) I see. You might need to align the config files with the higher detectron2. I have not done this before. Sorry about this. By the way, are the value of lr and weight_decay normal in your program. It seems that the direct cause is that the program does not get a float value. Perhaps it was treated as a string type variable or other types. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Hello, I‘d like to ask the version of your pytorch.

SamXiaosheng commented 1 year ago

my pytorch version is 1.6

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年12月3日(星期六) 晚上8:50 收件人: @.>; 抄送: "生second @.>; @.>; 主题: Re: [GuangxingHan/FCT] why occur this problem? could you help me to see it? (Issue #4)

i directly make the version of Detectron2 from 0.6 to 0.2.1,and your project is working now !  … ------------------ 原始邮件 ------------------ 发件人: "GuangxingHan/FCT" @.>; 发送时间: 2022年11月15日(星期二) 凌晨0:17 @.>; 抄送: "生second @.@.>; 主题: Re: [GuangxingHan/FCT] why occur this problem? could you help me to see it? (Issue #4) I see. You might need to align the config files with the higher detectron2. I have not done this before. Sorry about this. By the way, are the value of lr and weight_decay normal in your program. It seems that the direct cause is that the program does not get a float value. Perhaps it was treated as a string type variable or other types. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Hello, I‘d like to ask the version of your pytorch.

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

Bitdopad commented 1 year ago

OK,thank you very much!

judycpChen commented 3 months ago

i directly make the version of Detectron2 from 0.6 to 0.2.1,and your project is working now !  ------------------ 原始邮件 ------------------ 发件人: "GuangxingHan/FCT" @.>; 发送时间: 2022年11月15日(星期二) 凌晨0:17 @.>; 抄送: "生second @.**@.>; 主题: Re: [GuangxingHan/FCT] why occur this problem? could you help me to see it? (Issue #4) I see. You might need to align the config files with the higher detectron2. I have not done this before. Sorry about this. By the way, are the value of lr and weight_decay normal in your program. It seems that the direct cause is that the program does not get a float value. Perhaps it was treated as a string type variable or other types. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Hi, how can you make the version of Detectron2 from 0.6 to 0.2.1? I have tried many times and failed.