How to get the index of the pruned channel(s) when using High-level Pruners? #116
Unanswered
YuxuanDuan
asked this question in
Q&A
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
# ...
}
] |
1 reply
|
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)
# ... |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I want to know which channels are pruned during the process of L2-norm pruning , but i don't know how
All reactions