changlin31 / DS-Net

(CVPR 2021, Oral) Dynamic Slimmable Network
226 stars 19 forks source link

Dynamic path for DS-mobilenet #12

Open NoLookDefense opened 2 years ago

NoLookDefense commented 2 years ago

Hi. Thanks for your work. I am reading your paper and trying to reimplement, and I feel confused about some details. You mentioned in your paper that the slimming ratio ρ∈[0.35 : 0.05 : 1.25], which have 18 paths. However, in your code, there are only 14 paths ρ∈[0.35 : 0.05 : 1] as mentioned in https://github.com/changlin31/DS-Net/blob/15cd3036970ec27d2c306014344fd50d9e9b888b/dyn_slim/models/dyn_slim_net.py#L36 . And also, when conducting gate training, the gate function only has a 4-dimension output, meaning that there is only 4 paths and the slimming ratio is restricted to ρ∈[0.35 : 0.05 : 0.5]. https://github.com/changlin31/DS-Net/blob/15cd3036970ec27d2c306014344fd50d9e9b888b/dyn_slim/models/dyn_slim_blocks.py#L204 Why the dynamic path for larger network is not used?

changlin31 commented 2 years ago

Hi, @NoLookDefense We made some explanations on the implementation of the routing space in the Supplementary Material.

  1. For number of paths: image
  2. For restricted paths: image

Please feel free to ask if you have further questions.