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

Question about calculating MAdds of dynamic network in the paper #2

Closed
sseung0703 opened this issue Apr 22, 2021 · 3 comments
Closed
Labels
discussion Not a issue with the code

Comments

@sseung0703
Copy link

Thank you for your great work, and I have a question about how to calculate MAdds in your paper.
The dynamic network has different widths and MAdds for each instance, but you denoted MAdds for your networks.
Are they the average MAdds for the whole dataset?

@changlin31
Copy link
Owner

Yes, the MAdds are averaged over the validation set, e.g.:

flops_m.update(reduced_flops.item(), input.size(0))

@sseung0703
Copy link
Author

Thank you for your rapid answer. 😊
I think it is hard to know how much MAdds is required before the validation, but you achieved similar MAdds to comparative algorithms.
Is there any rule to achieve specific MAdds?

@changlin31
Copy link
Owner

Thanks for the valuable question.
The gate is actually very sensitive to hyperparameters. To avoid troublesome tuning of the loss balancing factors and other hyperparameters, we use different routing space for different network, e.g. we only use the slimmest few sub-networks to form the DS-Net-S.

This can be find in Appendix.A of the paper
image

In practice, We first test the MAdds for each sub-networks, then manually choose those sub-networks with MAdds around the target MAdds as the dynamic routing space.

@changlin31 changlin31 added the discussion Not a issue with the code label Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Not a issue with the code
Projects
None yet
Development

No branches or pull requests

2 participants