Tencent / PocketFlow

An Automatic Model Compression (AutoMC) framework for developing smaller and faster AI applications.
https://pocketflow.github.io
Other
2.78k stars 490 forks source link

Document issue: Channel pruning(GPU) & self-defined model #111

Open zheLim opened 5 years ago

zheLim commented 5 years ago

After having a glance on channel pruning gpu version, i found that gpu version may not strictly implement lasso regression. Neither Coordinate descent method nor LARS optimization algorithm are used. It will be great if you can add some description about gpu version on algorithm or something else.

BTW, The document of self-defined model is not clear enough.

In all, PocketFlow is a great job and i learn a lot and i am still learning from it :) .

zheLim commented 5 years ago

BTW, CPU version of channel pruning only deals with regular 2D convolution. It cannot process dilation convolution. It would be better if an clarification is add to documents.

jiaxiang-wu commented 5 years ago

@zheLim Thanks for your suggestions.

  1. The GPU version does not implement lasso regression. Actually, it is solving a L2,1-norm regularized optimization problem with proximal gradient descent. The regularization strength is gradually increasing to slowly lift the pruning ratio to the target value. We will provide an independent documentation to describe its algorithm in details.
  2. We will clarify these details in the "self-defined models" documentation.
  3. This will be clarified in the next PR.
zheLim commented 5 years ago

Thanks for reply. Does solving a L2,1-norm regularized optimization problem get better result than lasso regression?

jiaxiang-wu commented 5 years ago

It runs faster under multi-GPU setting, and achieves higher accuracy on some models. We will provide more detailed results in the documentation.

zheLim commented 5 years ago

Thanks a lot :)

jiaxiang-wu commented 5 years ago

Doc:

  1. add documentation for ChannelPrunedGpuLearner;
  2. fix minor issues in "self-defined models" and ChannelPrunedLearner.
GoldenSpark commented 5 years ago

Hey @jiaxiang-wu
How about the accuracy of ChannelPrunerGpuLearner on MobileNet ? Is this a structured pruning algorithm which leads to a regular pattern of sparsity?

jiaxiang-wu commented 5 years ago
  1. For MobileNet-v1, the top-1 accuracies are: 68.5% (50% FLOPs) | 67.8% (40% FLOPs) | 66.3% (30% FLOPs)
  2. ChannelPrunedGpuLearner is a structured-pruning algorithm. The compressed model has regular sparsity patterns.
GoldenSpark commented 5 years ago

@jiaxiang-wu Thanks much!