This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
Keras-MXNet 2.2.0
sandeep-krishnamurthy
released this
22 Jun 15:02
·
470 commits
to master
since this release
Highlights
- Update keras-apache-mxnet to keras-team/keras v2.2.0. Please read Keras release notes for more details on core Keras changes. To summarize, this release has major Keras core changes in Sequential and Model classes. User-facing breaking change is only with removal of
merge layers
and newtrucated_normal
base initializer depthwise_conv2d
,separable_conv2d
is now supported with MXNet backend. You can use MobileNet and Xception networks. PRconv1d
withcausal
padding is now supported with MXNet backend. PRCustom Loss
is now supported with MXNet backend. PR
Bug Fixes
- Fix crashing softmax operator on GPUs. PR
- Custom callback and custom loss is now supported with MXNet backend.
Performance
<< Same as v2.1.6. No major performance optimization updates in this release compared to the previous release. >>
- Keras-MXNet CNN benchmarks show up to 3X performance improvement on GPUs. See Benchmark Results document for more details.
- Keras-MXNet RNN support is experimental. Performance on CPU is known to be up to 2X slower (Related issue). However, performance on GPU shows up to 2X performance improvement.
Unsupported Functionalities
<< Same as previous release v2.1.6 except for support for depthwise, separable and conv1D with causal >>
- RNN with Keras-MXNet is experimental and do not support
variable length inputs
andunroll=False
. You need to pad input sequences to make it static length and provideinput``length
and setunroll=True
. See using RNN with Keras-MXNet tutorial for more details. - 15 Keras operators are not supported with MXNet backend. Update operators, symbolic gradient, localconv1d, localconv2d, higher order functions, other operator like cumsum, cumprod, stack, ctc and more. See Operators missing with MXNet backend Github Issue for more details.
- Sparse Tensors are not supported with MXNet backend in this release.
- Unsupported keras/examples list.
- Cross backend models are not supported. Training with TensorFlow backend and loading the Keras model with MXNet backend is not supported.
Known Issues
- MXNet backend performance significantly drops with
channels_last
image_data_format. It is highly recommended to usechannels_first
image_data_format. See performance guide for more details. - MXNet backend does not support
boolean
. For example,in``topk
operator with MXNet backend uses0/1
instead of boolean. Issue depthwise_conv2d
supportsdepth_multiplier=1
only. Issue- LSTM layer fails if dropout is used. Issue
- Models with Custom Loss are not serializable. Issue
- You cannot slice axis of a Tensor with -1 index. There is a workaround for this issue. Issue
- If you have a custom loss function and use slicing operator, you need to explicitly set the _keras_shape of the loss tensor returned from your loss function. Issue
- Conv1D layer does not support explicit data_format passed layer. It always uses the image_data_format from keras.json config. Issue
Installation
# Install keras-mxnet
pip install keras-mxnet
# Install MXNet - CPU
pip install mxnet-mkl
# Install MXNet - GPU
pip install mxnet-cu90mkl
Contributions
Thanks to all the contributors for their contributions in this release:
@roywei, @kalyc, @sandeep-krishnamurthy
Other Resources and Getting Started
- Keras-MXNet installation guide - https://github.com/awslabs/keras-apache-mxnet/blob/master/docs/mxnet_backend/installation.md
- Using multi-gpu distributed training - https://github.com/awslabs/keras-apache-mxnet/blob/master/docs/mxnet_backend/multi_gpu_training.md
- Performance tuning guide for Keras with MXNet backend - https://github.com/awslabs/keras-apache-mxnet/blob/master/docs/mxnet_backend/performance_guide.md
- Export MXNet Model from Keras-MXNet - https://github.com/awslabs/keras-apache-mxnet/blob/master/docs/mxnet_backend/save_mxnet_model.md
- Using RNN in Keras-MXNet. Limitations and workarounds - https://github.com/awslabs/keras-apache-mxnet/blob/master/docs/mxnet_backend/using_rnn_with_mxnet_backend.md
- Keras-MXNet benchmark results -https://github.com/awslabs/keras-apache-mxnet/tree/master/benchmark