Closed ZWBdoudou closed 2 years ago
@ZWBdoudou I haven't used YOLOv5 before, can you specify which file you're pointing line 293 to?
抱歉现在才回复您,也很感谢您的回复。我把注意力模块添加进了yolov5/models/common.py文件下,相应的yaml文件也修改了,之后运行yolo.py时报错,报错的位置是在yolov5/models/yolo.py文件中的line 293。
@ZWBdoudou It seems that line 293 in yolov5/models/yolo.py
corresponds to the channel numbers required and you might be passing it incorrectly as Triplet is channel preserving and the issue you are facing is not related to Triplet. I recommend you to create an issue on the YOLOv5 repository itself for clarification.
line 293, in parsemodel m = nn.Sequential((m(args) for _ in range(n))) if n > 1 else m(*args) # module TypeError: init() takes from 1 to 2 positional arguments but 3 were given
您好,我在yolov5中想加入这个注意力,然后报这个错误,请问该如何修改呢?