MATLAB Answers

How to use prune for CNNs?

7 views (last 30 days)
Nour Mohamed
Nour Mohamed on 12 Jan 2021
Commented: Nour Mohamed on 18 Jan 2021
I want to prune pretrained CNNs by certain rates (0.1-0.9). But when I try to use the prune function I get the following error:
Check for missing argument or incorrect argument data type in call to function 'prune'.
How can I use this function for CNNs (in this case resnet18) and is there a way to specify the pruning rate?
Thank you,

Answers (1)

Nitin Kapgate
Nitin Kapgate on 15 Jan 2021
Currently the "prune" function does not provide the functionality to prune the network at specified pruninng rate.
The prune function removes zero-sized inputs, layers, and outputs from a network.
This leaves a network which may have fewer inputs and outputs, but which implements the same operations, as zero-sized inputs and outputs do not convey any information.
  1 Comment
Nour Mohamed
Nour Mohamed on 18 Jan 2021
Thank you for your answer. But why can't I use it with CNNs? Why do I get that error?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by