yolov8剪枝前后权重大小没变,推理速度也没变
用的是examples里面的yolov8_pruning
剪枝完成后,打印语句 After pruning iter 12: MACs=7.6973132 G, #Params=5.751394 M, mAP=0.7409106360181956, speed up=1.854154563958759 After fine tuning mAP=0.8953202549181167
虽然它说参数量下降、速度提升,但是生成的onnx权重和pt权重大小均未改变,推理时速度也没变,用的GPU推理
权重大小没变是因为target-prune-rate设置的不够大,设置成0.5,权重就变小了。
但是在gpu上的推理速度仍然没有改变,在cpu上剪枝后的推理速度是推理前的1.59倍。
我想问一下,为什么在gpu上的推理速度没有变快啊?
how about the mAP metrics between base and pruned model? @Goddaman
Hi! If you're interested in pruning YOLOv8, YOLOv10 and YOLOv11 models, feel free to check out this repo: https://github.com/heyongxin233/YOLO-Pruning-RKNN. Hope it helps!
我的结果更奇怪,剪枝后参数量没变 Before Pruning: MACs=14.414051 G, #Params=0.037923 G After Pruning: MACs=14.414051 G, #Params=0.037923 G