keras-team / keras-applications

Reference implementations of popular deep learning models.
Other
2k stars 913 forks source link

MobileNetV1: Adding Regularizers #117

Open fzyzcjy opened 5 years ago

fzyzcjy commented 5 years ago

As is seen in https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.py, the L2 regularizer is applied when training. However, the keras-applications does not have it. It is perfectly fine if one uses the pre-trained weight, but is not very good if wanting to fine-tune or to train their own weights. Therefore, I am thinking about adding it. Is it ok? (p.s. title edited because I posted it by accident without finishing writing)

taehoonlee commented 5 years ago

@fzyzcjy, Yes, I agree with you. The l2 is essential for training. But it is not easy to add them.

  1. I think that adding l2 into only a single model is not good. In order to add them, we'd better apply them into all the models in the keras-applications. We must survey all the original papers or repositories.
  2. In the current APIs, we must change all the lines of individual layer definitions. It is not an efficient job. We'd better propose a new API first, like arg_scope in TensorFlow.
fzyzcjy commented 5 years ago

@taehoonlee I agree with you. So shall we create an issue in tf repo?