我自己添加BiFPN时遇到报错,发现问题出在添加BiFPN_Add2与BiFPN_Add3中
from models.common import ( C3, C3SPP, C3TR, SPP, SPPF, Bottleneck, BottleneckCSP, C3Ghost, C3x, Classify, Concat, Contract, Conv, CrossConv, DetectMultiBackend, DWConv, DWConvTranspose2d, Expand, Focus, GhostBottleneck, GhostConv, Proto, BiFPN_Add2, BiFPN_Add3 )这里添加以上 后续不需要添加
if m in { Conv, GhostConv, Bottleneck, GhostBottleneck, SPP, SPPF, DWConv, MixConv2d, Focus, CrossConv, BottleneckCSP, C3, C3TR, C3SPP, C3Ghost, nn.ConvTranspose2d, DWConvTranspose2d, C3x, CBAM, }: #BiFPN_Add2, # BiFPN_Add3