Pruning: How to preserve the number of output channels of a particular layer? #5737
-
I have a simple conv model and am able to obtain pruning masks and use ModelSpeedup to alter the model successfully. Minimal Code
I tried adding the layer names in
Even if it works, I am no entirely if the pipeline will entirely skip the weights when mentioned. For example in the above model I would like to preserve the output channels of I tried adding What is the correct way to preserve or freeze output channels of a particular layer in the model? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Found out that the op names do not and should not include
Log
However, using Perhaps for a more direct way to add in config to only do pruning on input channels, there is a
There are a few warnings running it with this config Log
The warnings mention that the weights and biases configured for more than once are ignored, the ones from the first config are kept. When swapping the order granularity config is simply ignored because of the same. That said, it would be more intuitive to define the base case first and override it with a special case. |
Beta Was this translation helpful? Give feedback.
Found out that the op names do not and should not include
weight
orbias
. So with that, using adding the last layer's name in the exclude_op_names just works:Log