Keras Implementation of MixNets from the paper MixNets: : Mixed Depthwise Convolution Kernels.
Code ported from the official codebase https://github.com/tensorflow/tpu/blob/master/models/official/mnasnet/mixnet
From the above paper, a Mixed Convolution is a group of convolutions with varying filter sizes. The paper suggests that [3x3, 5x5, 7x7] can be used safely without any loss in performance (and possible increase in performance), while a 9x9 or 11x11 may degrade performance if used without proper architecture search.
$ pip install keras_mixnets
pip install git+https://github.com/titu1994/keras_mixnets.git
OR
git clone https://github.com/titu1994/keras_mixnets.git
cd keras_mixnets
pip install .
Due to the use of Model Subclassing, the keras model built *cannot be deserialized using load_model
. You must build the model each time. tf.keras supports writing Layers which have additional Layers within them, but as Keras itself does not support it yet, these models cannot be deserialized using load_model
.
from keras_mixnets import MixNetSmall # Medium and Large can also be used
model = MixNetSmall((224, 224, 3), include_top=True)
Weights for these models have not been ported yet from Tensorflow.
- Tensorflow 1.14+ (Not 2.x)
- Keras 2.2.4+