Bisonai / mobilenetv3-tensorflow

Unofficial implementation of MobileNetV3 architecture described in paper Searching for MobileNetV3.
Apache License 2.0
225 stars 81 forks source link

Not including top layers #17

Closed Eichhof closed 3 years ago

Eichhof commented 3 years ago

Hello

Thanks for the code and the work. How can I remove the top layers (classification layer) so that I can add my own classification layers? Similar to when using MobileNetV2(weights=None, include_top=False) in tensorflow.keras.applications.

martinkersner commented 3 years ago

Hi @Eichhof

Thank you for interest in our MobileNetV3 implementation!

We do not have parameter to remove the top layer (like the include_top=False), but you can manually remove conv3 and squeeze layers from call method inside LastStage layer to achieve the same result.

https://github.com/Bisonai/mobilenetv3-tensorflow/blob/234167b3a5a28e113a8d3c116823f085a01e1755/layers.py#L340-L341

Cheers, Martin

Eichhof commented 3 years ago

Dear Martin

Thanks a lot for your answer. I will give it a try.