vvhj / APRCP-HRNet

APRCP HRNet: Adaptive Pruning Rate Channel Pruning for HRNet Applied to 2D Human Pose Estimation
MIT License
37 stars 9 forks source link

BnCfg in PrunePose_HrNet #2

Open tuongtranngoc opened 3 years ago

tuongtranngoc commented 3 years ago

Hi, I see bncfg param in purnpose_hrnet.py but i do'nt see it. PLease explain!

vvhj commented 3 years ago

For APRCP HRNet you can get our prtrain model in : https://drive.google.com/file/d/1-EXl9dSatzmUSGpWGuBFlcPPM9T8Gcfr/view?usp=drivesdk

For a purned model, there are two main file:

pruneXXX.txt // to build model XXXXXXXX.pth // weight of model

pruneXXX.txt is bncfg

tuongtranngoc commented 3 years ago

Thank @vvhj , I test model w32_extreme and w32_best on RTX2080ti inference time of two model (~30ms) are same original model. it's no change!!

vvhj commented 3 years ago

CPU is work, The effect of GPU is not obvious because of parallel computing, but I am trying to speed up GPU by pruning without skipping fusion layer (another reason mybe that RTX2080ti is too powerful).

vvhj commented 3 years ago

Some new work will open after cvpr2021, and we will response you as soon as possible.

tuongtranngoc commented 3 years ago

I understand, thank you very much.

sunmengnan commented 3 years ago

why self.bnindex += 2 in class PosePurnHighResolutionNet?WHy isn't +1?

vvhj commented 3 years ago

We prune 2 bn layer in one basic modules, so self.bnindex += 2. If you only prune 1 bn layer self.bnindex += 1. You can add a breakpoint on the "modules" to see the network structure.

sunmengnan commented 3 years ago

Thx whj, I saw in the end, you measure the idx by adding the mean of ap+acc and the index of percent, why add the index of percent? I don't quite understand.

sunmengnan commented 3 years ago

BTW, Have you ever taking not only the percent, but also the absolute sum value of the all the weights in each channel? It could be more reasonable.

ghgggg commented 3 years ago

I modified it with fuse layer pruning。this will reduce about 1/3 flops and the infertime will be 4/5 of the original。parameters could reach 1/4 of the src model size ,however it is not realtime

vvhj commented 3 years ago

BTW, Have you ever taking not only the percent, but also the absolute sum value of the all the weights in each channel? It could be more reasonable.

Thx, BTW I will try it.