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

About the parameters LAT_BEFORE and LAT_AFTER #4

Closed modifierT closed 2 years ago

modifierT commented 2 years ago

For the two parameters LAT_BEFORE and LAT_AFTER may be used when calculating the loss lat_cost = lat_cost + (config.DS.LAT_BEFORE[k] - config.DS.LAT_AFTER[k]) * slope_param_list[k] Therefore, what is the actual meaning of the two parameters and if I want to compress my own network, how to set the two parameters? thanks!

tilmto commented 2 years ago

Hi, this two parameters denote the real-device measured block-wise latency before and after shrinking, which are used for latency-aware decay on the learnable masks to prioritize latency-bottleneck blocks for shrinking. If you want to set this for your defined networks and target devices, you may need to measure the two latency values before and after shrinking and record them in the config file like we did for configs/mbv2.yaml.

modifierT commented 2 years ago

I got it, thanks a lot!