Hi, I wanna implement network pruning using PyTorch.
First, I use pruning algorithm to prune the model.
the result as follow:
a.png886×523 59.6 KB

then retrain the model.
but These cut weights are trained to be non-zero.
I wanna freeze only zero weights in entire network.
In this context, freeze means that freezed weights cannot be trained anymore.
The following method is not feasible

b.png1551×477 90.3 KB

Is there a better solution?