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

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 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.

4 participants