I am exploring pruning for research (I am not concerned with speed reduction). I am wondering if there is an easy way to assure that each layer gets pruned to the same degree. For example, when I prune with global unstructured (25%) I get this result layer by layer.
Sparsity in conv1.weight: 7.81%
Sparsity in conv2.weight: 18.60%
Sparsity in lin1.weight: 39.92%
Sparsity in lin2.weight: 11.89%
Sparsity in upconv1.weight: 11.33%
Sparsity in upconv2.weight: 8.59%
Global sparsity: 25.00%
The global sparsity is indeed 25%, but I would like this to be true for each layer individually. Does anyone have any ideas of how to best accomplish this?