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

Add several speedup examples#3880

Merged
zheng-ningxin merged 7 commits into
microsoft:masterfrom
zheng-ningxin:speedup_example
Jul 15, 2021
Merged

Add several speedup examples#3880
zheng-ningxin merged 7 commits into
microsoft:masterfrom
zheng-ningxin:speedup_example

Conversation

@zheng-ningxin

Copy link
Copy Markdown
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
@QuanluZhang QuanluZhang requested review from J-shang and linbinskn June 28, 2021 03:01
Comment thread examples/model_compress/pruning/speedup/speedup_yolov3.py
@linbinskn

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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