Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Keras-MXNet 2.2.2

Compare
Choose a tag to compare
@sandeep-krishnamurthy sandeep-krishnamurthy released this 15 Aug 20:02
· 226 commits to master since this release
01d59d3

Highlights

  1. Support new callback - MXNetModelCheckpoint supporting checkpointing the model as MXNet model. #132
  2. Add new get_mxnet_model_info() API to query underlying MXNet model metadata. #144
  3. 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
  4. sparse categorical crossentropy is now supported with MXNet backend. #145
  5. ACGAN and memory networks are now supported with MXNet backend. #148
  6. This release still uses keras_preprocessing==1.0.1 instead of latest keras_preprocessing==1.0.2 due to a known bug that is fixed in this PR but not included in 1.0.2.
  7. 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

  1. Fix batchnorm bug when gamma and beta is None. #137 (related issues: #119, #136)
  2. Fix Conv1D Layer bug with channels first format. #143 (related issues: #121 , #122)
  3. Fix element-wise comparison operators bug. #145 (related issues: #146)
  4. Fix CI to track PR changes instead of master. #141

Performance

  1. 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. >>

  1. Keras-MXNet CNN benchmarks show up to 3X performance improvement on GPUs. See Benchmark Results document for more details.
  2. 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 >>

  1. RNN with Keras-MXNet is experimental and do not support variable length inputs and unroll=False. You need to pad input sequences to make it static length and provide input``length and set unroll=True. See using RNN with Keras-MXNet tutorial for more details.
  2. 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.
  3. Sparse Tensors are not supported with MXNet backend in this release.
  4. Unsupported keras/examples list.
  5. Cross backend models are not supported. Training with TensorFlow backend and loading the Keras model with MXNet backend is not supported.

Known Issues

  1. MXNet backend performance significantly drops with channels_last image_data_format. It is highly recommended to use channels_first image_data_format. See performance guide for more details.
  2. MXNet backend does not support boolean. For example, in``topk operator with MXNet backend uses 0/1 instead of boolean. Issue
  3. depthwise_conv2d supports depth_multiplier=1 only. Issue
  4. LSTM layer fails if dropout is used. Issue
  5. Models with Custom Loss are not serializable. Issue
  6. You cannot slice axis of a Tensor with -1 index. There is a workaround for this issue. Issue
  7. 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

  1. Keras-MXNet installation guide - https://github.com/awslabs/keras-apache-mxnet/blob/master/docs/mxnet_backend/installation.md
  2. Using multi-gpu distributed training - https://github.com/awslabs/keras-apache-mxnet/blob/master/docs/mxnet_backend/multi_gpu_training.md
  3. Performance tuning guide for Keras with MXNet backend - https://github.com/awslabs/keras-apache-mxnet/blob/master/docs/mxnet_backend/performance_guide.md
  4. Export MXNet Model from Keras-MXNet - https://github.com/awslabs/keras-apache-mxnet/blob/master/docs/mxnet_backend/save_mxnet_model.md
  5. Checkpointing MXNet Model from Keras-MXNet - https://github.com/awslabs/keras-apache-mxnet/blob/master/docs/mxnet_backend/save_mxnet_model.md
  6. 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
  7. Keras-MXNet benchmark results -https://github.com/awslabs/keras-apache-mxnet/tree/master/benchmark