...
Keras 1.2.2 with MXNet Backend
Highlights
- Adding Apache MXNet backend for Keras 1.2.2.
- Easy to use multi-gputraining with MXNet backend.
- High-performance model training in Keras with MXNet backend.
Getting Started Resources
- Installation - https://github.com/dmlc/keras/wiki/Installation
- How to use Multi-GPU for training in Keras with MXNet backend - https://github.com/dmlc/keras/wiki/Using-Keras-with-MXNet-in-Multi-GPU-mode
- For more examples explore keras/examples directory.
- Source Repo - https://github.com/dmlc/keras
For more details on unsupported functionalities, known issues and resources refer to release notes - https://github.com/dmlc/keras/releases
Apple CoreML Converter
You can now convert your MXNet models into Apple CoreML format so that they can run on Apple devices which means that you can build your next iPhone app using your own MXNet model!
List of layers that can be converted:
- Activation
- Batchnorm
- Concat
- Convolution
- Deconvolution
- Dense
- Elementwise
- Flatten
- Pooling
- Reshape
- Softmax
- Transpose
With the above layers, this tool can convert models that are similar to:
- Inception
- Network-In-Network
- Squeezenet
- Resnet
- Vgg
Requires:
- MacOS - High Sierra 10.13Xcode 911 or higher
- Coremltools 0.5.0 or greater (pip install coremltools)
- Mxnet 0.10.0 or greater (Installation Instructions)
- Yaml (pip install pyyaml)
- Python 2.7
Example:
In order to convert, say a squeezenet model (which can be downloaded from here and the synset file can be downloaded from here), you can execute the following command: (assuming you are in the directory where mxnet_coreml_converter.py resides):
python mxnet_coreml_converter.py --model-prefix='squeezenet_v1.1' --epoch=0 --input-shape='{"data":"3,227,227"}' --mode=classifier --pre-processing-arguments='{"image_input_names":"data"}' --class-labels synset.txt --output-file="squeezenetv11.mlmodel"
You can find explanations for each parameter along with more examples here.
In order to use the generated CoreML model file into your project, refer to Apple's tutorial here.