xiaochus / MobileNetV3

A Keras implementation of MobileNetV3.
MIT License
237 stars 84 forks source link

How to change depth multiplier values? #12

Open anilsathyan7 opened 4 years ago

anilsathyan7 commented 4 years ago

Hey in you code depth multiplier value is 1 and width multiplier alpha can be configured and theoretically both seems to be different.If i change the depth multiplier value as 0.5 in depthwise conv2d(like waht appears in official mobilenetv2 or deeplab) it shows error. If i want to decrease the depth multiplier how can it be done?

Ref

  1. https://github.com/keras-team/keras/issues/10349
  2. https://github.com/keras-team/keras-applications/blob/master/keras_applications/mobilenet.py
henry2304 commented 4 years ago

Hi @anilsathyan7, I was also trying to get the alpha parameter to work, and set the alpha parameter to 0.5 by modifying line 106 of train_cls.py: model = MobileNetV3_Small(shape, n_class, 0.5).build() I don't seem to get any error, but the models (.h5 weights) I obtain still have size 12MB, which was the same as alpha=1.0. Did you have any luck on figuring this out, Anil? In case you or @xiaochus have any suggestions, please let me know. Thanks for helping implement this code, @xiaochus!

anilsathyan7 commented 4 years ago

Hi @henry2304 have you tried official implementation from keras-applications? Check out: https://github.com/keras-team/keras-applications/issues/183