nni
nni copied to clipboard
Iterative soft pruning
Hi, I want to apply iterative soft pruning to an object detector using FPGM pruner from NNI. This means that I want to follow this procedure: -prune the net -train it but with allowing the pruned filters to regain some weight -prune -start again
I wanted to ask : Does using the following code mess up with the models gradients? Because I am observing that although I train the model again after I unwrap it, the model's sparsity remains the same.
pruner = FPGM(net, congif_list)
pruner.compress()
pruner._unwrap_model()
And if it does zero out the gradients, is there a way to modify that to allow pruned weights to receive gradient updates?