How to get the index of the pruned channel(s) when using High-level Pruners? #116
Replies: 2 comments 2 replies
-
Hello @YuxuanDuan, thank you for bringing up this discussion. I was wondering if you could share your thoughts on a possible solution. Specifically, I was thinking about allowing the {
nn.Conv2d(....): [0,2,6],
nn.BatchNorm(...): [0,2,6],
} Or, what do you think about a more complicated output with group structures: [
{ # group 0
nn.Conv2d(....): [0,2,6],
nn.BatchNorm(...): [0,2,6],
#...
},
{ # group 1
# ...
}
] |
Beta Was this translation helpful? Give feedback.
-
Hi @YuxuanDuan, all pruners now support interactive pruning. You can use for i in range(iterative_steps):
for group in pruner.step(interactive=True):
print(group)
# do whatever you like with the group
# ...
group.prune() # you should manually call the group.prune()
macs, nparams = tp.utils.count_ops_and_params(model, example_inputs)
# finetune your model here
# finetune(model)
# ... |
Beta Was this translation helpful? Give feedback.
-
I want to know which channels are pruned during the process of L2-norm pruning , but i don't know how
Beta Was this translation helpful? Give feedback.
All reactions