2

I want to prune the MobileNetV1 model using the weight pruning method from https://www.tensorflow.org/model_optimization/guide/pruning However, I don't know how to set the pruning_schedule.

pruning_params = {
      'pruning_schedule': sparsity.PolynomialDecay(initial_sparsity=0.50,
                                                   final_sparsity=0.90,
                                                   begin_step=2000,
                                                   end_step=end_step,
                                                   frequency=100)
}

This is the code from the mnist example. If I want the final_sparsity to be 0.75 and fine tune from the keras MobileNet, how should I set the initial_sparsity, begin_step, end_step and frequency? Or should I use ConstantSparsity instead of PolynomialDecay?

bin.li
  • 61
  • 5

0 Answers0