Open HU-jin1620 opened 2 years ago
我出现了和你一样的问题。但我是在稀疏训练->剪枝->微调后,再次稀疏训练微调的模型时粗错了。
,再次稀疏训练微调的模型时粗错了
请问解决了吗,我自己的程序将引用C3的部门换为C3Prune也出现这个错误
I found this error after changing that referenced C3 to C3Prune in yolo.py file. m = nn.Sequential((m(args) for in range(n))) if n > 1 else m(*args) # module TypeError: C3Pruned.init() missing 2 required positional arguments: 'cv3out' and 'bottle_args' Pls kindly sort out this issue.
我出现了和你一样的问题。但我是在稀疏训练->剪枝->微调后,再次稀疏训练微调的模型时粗错了。
我也是这样的,请问你怎么解决的呀?
from n params module arguments
test_prune(opt.data,
File "F:/yolov5_mask/master/prune.py", line 452, in test_prune
pruned_model = ModelPruned(maskbndict=maskbndict, cfg=pruned_yaml, ch=3).cuda()
File "F:\yolov5_mask\master\models\yolo.py", line 250, in init
self.model, self.save, self.from_to_map = parse_pruned_model(self.maskbndict, deepcopy(self.yaml), ch=[ch]) # model, savelist
File "F:\yolov5_mask\master\models\yolo.py", line 711, in parse_prunedmodel
m = nn.Sequential([m(args) for _ in range(n)]) if n > 1 else m(*args) # module
TypeError: init() missing 4 required positional arguments: 'cv1out', 'cv2out', 'cv3out', and 'bottle_args'
Traceback (most recent call last): File "F:/yolov5_mask/master/prune.py", line 794, in
参照本仓库的的项目在自己的代码上修改出现了如上错误,有大佬能提点意见吗