facebookresearch / DepthShrinker

[ICML 2022] "DepthShrinker: A New Compression Paradigm Towards Boosting Real-Hardware Efficiency of Compact Neural Networks", by Yonggan Fu, Haichuan Yang, Jiayi Yuan, Meng Li, Cheng Wan, Raghuraman Krishnamoorthi, Vikas Chandra, Yingyan Lin
Other
69 stars 5 forks source link

Can I use DepthShrinker to compress trained yolov5s model files #2

Closed Nyove closed 2 years ago

Nyove commented 2 years ago

I want to compress my yolov5s model files. Do I just need to reformat my dataset?

tilmto commented 2 years ago

Hi, if you want to compress the backbone model in yolo5s from scratch, you may need to define your model in our format to enable the search for redundant activation functions, plus reformating the dataset and objectives.

Note that our DepthShrinker targets compressing compact neural networks and inverted residual blocks are favored by DepthShrinker. This is because the channel numbers in a block are in a first-wide-then-narrow manner, which can maintain comparable or smaller FLOPs after merging, while for other types of blocks, the theoretical FLOPs may increase after merging due to the kernel size. Therefore, whether to use our DepthShrinker as a compression paradigm may depend on your target model structure.

Nyove commented 2 years ago

Thanks a lot for your reply. I'll make the decision considering my actual needs