Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Filter prune algo implementation #1655

Merged
merged 47 commits into from
Nov 15, 2019
Merged

Conversation

chicm-ms
Copy link
Contributor

Implement filter pruning algorithms: Filter Pruning via Geometric Median for Deep Convolutional Neural Networks Acceleration (https://arxiv.org/abs/1811.00250)

@chicm-ms chicm-ms requested review from liuzhe-lz, LinquanLiu, QuanluZhang and xuehui1991 and removed request for LinquanLiu October 28, 2019 10:45
@chicm-ms chicm-ms changed the title Filter prune Filter prune algo implementation Oct 28, 2019
@liuzhe-lz liuzhe-lz closed this Oct 28, 2019
@liuzhe-lz liuzhe-lz reopened this Oct 28, 2019
@@ -0,0 +1,130 @@
from nni.compression.tensorflow import FPGMPruner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it easy to reproduce one of the experiments in the paper?

Copy link
Contributor Author

@chicm-ms chicm-ms Oct 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key metrics of the pruning are reduced FLOPs and accuracy change, to reproduce the reduced FLOPs, we need to use the pruned compact model, which is not implemented yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to offer some test metrics to make sure the implementation is correct.

Copy link
Contributor Author

@chicm-ms chicm-ms Nov 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I have added verification code in fpgm_torch_mnist.py example to verify the pruned conv kernel weight sparsity. By checking the sparsity and loss, we can verify:

  1. the configured layers are pruned.
  2. the pruned model has similar loss with origin model

But this code still can not verify the implementation is same as the paper. I am considering to add some kind of verification in UT.

@QuanluZhang
Copy link
Contributor

please update doc accordingly

}

default_layers = ['Dense', 'Conv2D']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between supported_layers and default_layers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated, please check again.

@chicm-ms chicm-ms closed this Nov 14, 2019
@chicm-ms chicm-ms reopened this Nov 14, 2019
@chicm-ms chicm-ms merged commit 262fabf into microsoft:master Nov 15, 2019
@chicm-ms chicm-ms deleted the filter_prune branch November 15, 2019 02:52
chicm-ms added a commit to chicm-ms/nni that referenced this pull request Nov 15, 2019
Filter prune algo implementation (microsoft#1655)
SparkSnail added a commit to SparkSnail/nni that referenced this pull request Nov 19, 2019
Filter prune algo implementation (microsoft#1655)
SparkSnail added a commit to SparkSnail/nni that referenced this pull request Nov 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants