FPD icon indicating copy to clipboard operation
FPD copied to clipboard

Error about training about "use_meta_conv"

Open leenamx opened this issue 1 year ago • 2 comments
trafficstars

Thanks for your great work!

I wanna run your code to train a base model, However, I met some errors as below:

Errors

And here is my environment: env

leenamx avatar Jul 18 '24 09:07 leenamx

This seems like a compatibility issue. Please make sure these versions are consistent:

mim install mmcv-full==1.6.0
mim install mmcls==0.25.0
mim install mmdet==2.24.0

Do not use mim to install mmfewshot

mim install mmfewshot  # bugs

Please let me know if the problem still exists.

wangchen1801 avatar Jul 18 '24 13:07 wangchen1801

Thanks for your reply! The error still persists and I found out by analyzing the traceback

File "/mnt/data/linan/FPD/fpd/fpd_detector.py", line 102, in extract_support_feat feats = self.backbone(img, use_meta_conv=True)

I try to delete the use_meta_conv parameter and then get the error as below:

image

I found FPD's Backbone uses use_meta_conv variable, which jumps to the ResNet class in mmdet/models/backbones/resnet.py when I run the train.py. By looking at the forward method of this class, I found that it does not support the use_meta_conv=True parameter, so the above error was generated.

image

By analyzing the network structure of the FPD, it is found that the backbone should refer mmfewshot/detection/models/resnet_with_meta_conv.py instead of resnet.py that not supporting use_meta_conv parameter.

In the end, I was able to run successfully by replacing the forward fuction in resnet.py of mmdet with the forward function in resnet_with_meta_conv.py of mmfewshot that supports use_meta_conv parameters.

image

Although the code has been successfully run now, the problem has not been completely resolved, and I am looking forward to working with you to solve the problem!

leenamx avatar Aug 02 '24 08:08 leenamx