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

about the inference speed #11

Open
Danee-wawawa opened this issue Dec 2, 2021 · 2 comments
Open

about the inference speed #11

Danee-wawawa opened this issue Dec 2, 2021 · 2 comments

Comments

@Danee-wawawa
Copy link

Hi, thank you for your work. I encountered a problem and hope to get your help.
I first used the supervised pretraining (SP) part of SkipNet to train the model, and got a new model, but when I used PYTorch for the forward speed test, I found that the speed did not decrease. I tried to increase the https:/ /github.com/ucbdrive/skipnet/blob/master/imagenet/models.py#L278, the parameter value here is 0.5 to 0.9. It is found that the accuracy of the model on the test set is indeed reduced a lot, but the forward speed is still not improved, almost the same. Do I need to modify the model in inference?
I am very confused about where the problem is, I hope to get your help, thank you very much.

@wangqiim
Copy link

wangqiim commented Mar 8, 2022

Yes, in this code it can't improve speed, because it excatly excute all conv(need be skip by test if times 0), then times 1 or 0, it represent excute or skip. I think you should modify it. I think a easy way to modfiy is to adjust bachsize to 1, then modify code(if prob = 0, don't excute conv).

@akinsanyaayomide
Copy link

Hello @Danee-wawawa . Have you been able to resolve this problem?

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

No branches or pull requests

3 participants