wenxinss / DR-YOLO

11 stars 1 forks source link

NameError: name 'SPPF' is not defined #4

Open PangJian123 opened 2 months ago

PangJian123 commented 2 months ago

Hi, I try to run train.py, but have the following errors: " File "/home/DR-YOLO-master/models/yolo_modify.py", line 778, in parse_model SPP, SPPF, SPPCSPC, GhostSPPCSPC, MixConv2d, Focus, Stem, GhostStem, CrossConv, NameError: name 'SPPF' is not defined". Some functions, such as SPPF, GhostSPPCSPC, Bottleneck are not defined. How can I solve it? Thanks!

xiaoxinhu commented 1 month ago

Hi, I try to run train.py, but have the following errors: " File "/home/DR-YOLO-master/models/yolo_modify.py", line 778, in parse_model SPP, SPPF, SPPCSPC, GhostSPPCSPC, MixConv2d, Focus, Stem, GhostStem, CrossConv, NameError: name 'SPPF' is not defined". Some functions, such as SPPF, GhostSPPCSPC, Bottleneck are not defined. How can I solve it? Thanks!

I also encountered this problem. Have you solved it?

wenxinss commented 1 month ago

Please copy the function in https://github.com/WongKinYiu/yolov7/blob/main/models/common.py

xiaoxinhu commented 1 month ago

您好 还有个GetOrImgUp这个类有用到 然后也没定义 不是common,py里的 只要我的输出通道不是最后一层,我都要给输出通道数变为靠近8的整数倍 if c2 != no and m is not GetOrImgUp: # if not output c2 = make_divisible(c2 * gw, 8) # 控制宽度的代码(卷积核个数)