To prune the model, we only prune the layer with parameters, we use BatchNorm2d to channel importance γ \gammaγ parameter for dilution training. BatchNorm2d and its front and rear layers also need to be pruned. Mainly for layers with parameters:Conv2d
,BatchNorm2d
,Linear
. But we will not prune the Pool2d layer, because Pool2d is only used for downsampling, there are no learnable parameters, no processing
0 VGG model code
import<