Commit Graph

12 Commits

Author SHA1 Message Date
Scott Zhu
ef88a7aad4 Port the Mobilenet_v3 to keras/application.
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
2020-08-09 20:59:44 -07:00
Francois Chollet
0d7620c3bc Add EfficientNetB0 to B7 to Keras Applications.
Also add swish activation to keras.activations (used by EfficientNets).

PiperOrigin-RevId: 286614744
Change-Id: Ieba8b1f47735bdbb31c4efc84f45f763b9daa9a4
2019-12-20 11:47:56 -08:00
Francois Chollet
23c3bdaacd Fold Keras Applications into tf.keras, since it is no longer necessary to share
the implementation of Keras Applications across tf.keras and multi-backend
Keras.

PiperOrigin-RevId: 285302893
Change-Id: I06084c6827df651c68547c488e9fcad908d36796
2019-12-12 17:09:51 -08:00
A. Unique TensorFlower
c51b47f8ea Fold Keras Applications into tf.keras, since it is no longer necessary to share
the implementation of Keras Applications across tf.keras and multi-backend
Keras.

PiperOrigin-RevId: 285107804
Change-Id: I8cb04dc0bb665d2b51c3f41a23c2226d2ac4a29f
2019-12-11 19:05:32 -08:00
Francois Chollet
f63a8fd801 Fold Keras Applications into tf.keras, since it is no longer necessary to share
the implementation of Keras Applications across tf.keras and multi-backend
Keras.

PiperOrigin-RevId: 285084218
Change-Id: I27f574cae7476dda0161759470663ee89f3b4df6
2019-12-11 16:18:48 -08:00
Scott Zhu
77b77e1108 Remove the __init__.py for keras_application.
All the reference to shortcut in __init__ has been replaced with explicit import.

PiperOrigin-RevId: 274867057
Change-Id: Icd9d642d638821b8e825ec266aaa6d054ae900c8
2019-10-15 13:39:12 -07:00
Francois Chollet
74ed09afaf Add Keras Applications ResNet101, ResNet152, ResNet50V2, ResNet101V2,
ResNet152V2.

PiperOrigin-RevId: 252523729
2019-06-10 17:56:10 -07:00
TensorFlower Gardener
b33094fa0d Merge pull request from siju-samuel:patch-21
PiperOrigin-RevId: 234216181
2019-02-15 14:53:03 -08:00
Francois Chollet
670207218c Update applications test.
PiperOrigin-RevId: 232940552
2019-02-07 14:08:56 -08:00
Siju
2dd2a69ad9
Added mobilenetV2 in keras application test 2019-02-07 08:23:32 +05:30
Francois Chollet
f6c3c9733e Upgrade Keras applications and Keras preprocessing.
PiperOrigin-RevId: 210174523
2018-08-24 16:19:29 -07:00
Francois Chollet
1e2566f029 Replace applications tests with lighter integration test.
Also remove MobileNetV2 due to a compatibility issue (will be re-enabled in the next version).

PiperOrigin-RevId: 208517089
2018-08-13 11:52:10 -07:00