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

New weight sparse method #161

Closed Moran232 closed 5 years ago

Moran232 commented 5 years ago

Hi, I want to add some other weight sparse method. It seems that I need to create a new learner with the pr_optimizer, rl_helper. I am confused about the relationship between them. Can you give some guidelines on how to add a new weight sparse method?

jiaxiang-wu commented 5 years ago

To start with, you only need to implement a xxxxLearner class which includes your weight sparsification method. If your algorithm involves some hyper-parameters that need to be automatically tuned via RL, then you may need "pr_optimizer" and "rl_helper". Otherwise, a single xxxxLearner class should be enough (e.g. UniformQuantTfLearner for uniform quantization based on TensorFlow's quantization-aware training APIs).