iscyy / yoloair

🔥🔥🔥 专注于YOLOv5,YOLOv7、YOLOv8、YOLOv9改进模型,Support to improve backbone, neck, head, loss, IoU, NMS and other modules🚀
https://github.com/iscyy/yoloair
GNU General Public License v3.0
2.51k stars 430 forks source link

C3STR issue? #182

Open sun0717 opened 1 year ago

sun0717 commented 1 year ago

class C3STR(C3):

C3 module with SwinTransformerBlock()

def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5):
    super().__init__(c1, c2, c2, n, shortcut, g, e)
    c_ = int(c2 * e)
    num_heads = c_ // 32
    self.m = SwinTransformerBlock(c_, c_, num_heads, n)

super().init(c1, c2, c2, n, shortcut, g, e) <-- maybe there has two c2? and correct solution is super().init(c1, c2, n, shortcut, g, e) that model can trainning.