I have used your project to pruned yolov4-tiny model succeed. And i want to convert my pruned model (in pt format) to onnx to deploy on my system. But when I set ONNX_EXPORT to True, I get the following error:
File "workspaces/Pruned-OpenVINO-YOLO/Pruneyolov3v4/models.py", line 207, in forward p = p.view(bs, self.na, self.no, self.ny, self.nx).permute(0, 1, 3, 4, 2).contiguous() # prediction RuntimeError: shape '[1, 3, 11, 64, 64]' is invalid for input of size 8448
I think this error is because the pruned model has changed the filter parameters in some layers compared to the original model.
I attached the configuration file of my model before and after pruning. Please help to to resolved this problem.
Thanks
Hi,
I have used your project to pruned yolov4-tiny model succeed. And i want to convert my pruned model (in pt format) to onnx to deploy on my system. But when I set ONNX_EXPORT to True, I get the following error:
File "workspaces/Pruned-OpenVINO-YOLO/Pruneyolov3v4/models.py", line 207, in forward p = p.view(bs, self.na, self.no, self.ny, self.nx).permute(0, 1, 3, 4, 2).contiguous() # prediction RuntimeError: shape '[1, 3, 11, 64, 64]' is invalid for input of size 8448
I think this error is because the pruned model has changed the filter parameters in some layers compared to the original model.
I attached the configuration file of my model before and after pruning. Please help to to resolved this problem. Thanks
yolov4-tiny.txt prune_0.71_keep_0.01_yolov4-tiny.txt