-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add several speedup examples #3880
Add several speedup examples #3880
Conversation
The file model_speedup.py can't be moved directly to the new folder speedup since |
NanoDet model can be installed from https://github.com/RangiLyu/nanodet.git | ||
""" | ||
|
||
cfg_path = r"nanodet/config/nanodet-RepVGG-A0_416.yml" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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).