Fix https://github.com/tensorflow/tensorflow/issues/40217.
The implementation is based on https://github.com/keras-team/keras-applications/blob/master/keras_applications/mobilenet_v3.py with a few modifications.
1. Updated to use TF backend only (theano related code is removed).
2. Remove all the *kwargs, and directly use tf.keras packages (disallow package injection).
3. Add 'classifier_activation' which is used by 'top' layer. This is aligned with v1/v2 implementation.
4. [Major] Changed the include_top implementation. The Conv2D layer with name "Conv_2" and its activation is moved to be base model structure, which means they are in the model even the include_top is False. This is based on comparing the implementation detail in original slim implementation in a811a3b7e6/research/slim/nets/mobilenet/mobilenet_v3.py. If we can confirm this change is correct, then we should also fix it on the OSS keras_application as well.
5. [Major] Remove the first ZeroPadding2D layer right after the model input, and change the first conv2D layer to use "same" padding. This is aligned with original implementation in 692215511a/research/slim/nets/mobilenet/mobilenet.py (L155), where use_explicit_padding is False.
6. Added API for preprocess_input and decode_predictions, which aligns with v1 and v2 implementation.
PiperOrigin-RevId: 325734579
Change-Id: I2ba6a9aa695baaa145d1a7cd3aeae86d48b823a2
Also add swish activation to keras.activations (used by EfficientNets).
PiperOrigin-RevId: 286614744
Change-Id: Ieba8b1f47735bdbb31c4efc84f45f763b9daa9a4
the implementation of Keras Applications across tf.keras and multi-backend
Keras.
PiperOrigin-RevId: 285302893
Change-Id: I06084c6827df651c68547c488e9fcad908d36796
the implementation of Keras Applications across tf.keras and multi-backend
Keras.
PiperOrigin-RevId: 285107804
Change-Id: I8cb04dc0bb665d2b51c3f41a23c2226d2ac4a29f
the implementation of Keras Applications across tf.keras and multi-backend
Keras.
PiperOrigin-RevId: 285084218
Change-Id: I27f574cae7476dda0161759470663ee89f3b4df6
All the reference to shortcut in __init__ has been replaced with explicit import.
PiperOrigin-RevId: 274867057
Change-Id: Icd9d642d638821b8e825ec266aaa6d054ae900c8