This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
Keras-MXNet 2.2.2
sandeep-krishnamurthy
released this
15 Aug 20:02
·
226 commits
to master
since this release
Highlights
- Support new callback -
MXNetModelCheckpoint
supporting checkpointing the model as MXNet model. #132 - Add new
get_mxnet_model_info()
API to query underlying MXNet model metadata. #144 - Add new tutorial for using MXNetModelCheckpoint and get_mxnet_model_info() API, to train model using Keras-MXNet, use the checkpoint call to save the best model in MXNet model format, use model info API to get metadata required for binding the model in MXNet. #147
sparse categorical crossentropy
is now supported with MXNet backend. #145- ACGAN and memory networks are now supported with MXNet backend. #148
- This release still uses
keras_preprocessing==1.0.1
instead of latestkeras_preprocessing==1.0.2
due to a known bug that is fixed in this PR but not included in 1.0.2. - Update keras-apache-mxnet to keras-team/keras v2.2.2. Please read Keras release notes for more details on core Keras changes. To summarize, this is mainly a bug fix and performance improvement release from keras-team/keras.
Bug Fixes
- Fix batchnorm bug when gamma and beta is None. #137 (related issues: #119, #136)
- Fix Conv1D Layer bug with channels first format. #143 (related issues: #121 , #122)
- Fix element-wise comparison operators bug. #145 (related issues: #146)
- Fix CI to track PR changes instead of master. #141
Performance
- Add CNN CPU Inference benchmarks results. PR Keras-MXNet CNN inference benchmarks show up to 1.5X performance improvement on CPU. See Benchmark Results
<< 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
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
- Checkpointing 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