Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add several speedup examples #3880

Merged
merged 7 commits into from
Jul 15, 2021

Conversation

zheng-ningxin
Copy link
Contributor

Add a few common detection model examples (if the model written by the user fails to speedup, he/she can refer to the repo we gave).

Ningxin Zheng added 2 commits June 26, 2021 04:56
@linbinskn
Copy link
Contributor

The file model_speedup.py can't be moved directly to the new folder speedup since

https://github.com/microsoft/nni/blob/master/examples/model_compress/pruning/model_speedup.py#L10

NanoDet model can be installed from https://github.com/RangiLyu/nanodet.git
"""

cfg_path = r"nanodet/config/nanodet-RepVGG-A0_416.yml"
Copy link
Contributor

Choose a reason for hiding this comment

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

It is a little strange that user has to install model from other repo for running example. If this model is not very complicated, can we add it into our model compression model files so that user can run it directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

no need to put their code into our repo. but we can provide concrete commands about how to prepare the code in the comment

not_safe = not_safe_to_prune(model, dummy_input)
cfg_list = []
for name, module in model.named_modules():
if name in not_safe:
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can leverage "exclude" here in the config, @J-shang

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, exclude is much more elegant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants