-
Notifications
You must be signed in to change notification settings - Fork 98
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
Cut the model to save time #13
Comments
Could you share your code?Thank you! |
@xfby2016, I hope you can get the idea, You can also see this blog `def CutModel():
`
` I will upload the whole stuff when it finished, there are many changes and improvements. |
Thanks for your share!Do you have the idea for accelerating Mahalanobis distance calculation? |
@QQR1 please have a look |
A nice idea, thanks for your code! |
the Resnet has 4 layers, so if you want to use only 3 layers (1-3), you can cut the model, this will save the time
I tried it in my case, I used only 2 layers, so the new model contains only layer1 and layer2.
you do not need to compute the whole forward pass with all layers, so the inference time was decreased
The text was updated successfully, but these errors were encountered: