yolov5prune icon indicating copy to clipboard operation
yolov5prune copied to clipboard

用到未剪枝的C3块的部分如何对接剪枝后的C3Pruned

Open Sa-UpWorld opened this issue 2 years ago • 0 comments

作者您好,我在剪枝时尝试将YOLOV5自带的C3TR带进去,将C3TR中的C3引用替换为剪枝后的C3Pruned,但会报错,您可以帮忙看一下嘛,参数一值传不完整 class C3TR(C3Pruned): # C3 module with TransformerBlock() def init(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): super(C3TR,self).init(c1, c2, n, shortcut, g, e) c_ = int(c2 * e) self.m = TransformerBlock(c_, c_, 4, n)

报错为: TypeError: init() missing 1 required positional argument: 'c2',我不明白为什么从c2参数一直传不进去

Sa-UpWorld avatar May 25 '22 01:05 Sa-UpWorld