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

Keras-MXNet 2.2.0

Compare
Choose a tag to compare
@sandeep-krishnamurthy sandeep-krishnamurthy released this 22 Jun 15:02
· 470 commits to master since this release
332c62f

Highlights

  1. 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 new trucated_normal base initializer
  2. depthwise_conv2d, separable_conv2d is now supported with MXNet backend. You can use MobileNet and Xception networks. PR
  3. conv1d with causal padding is now supported with MXNet backend. PR
  4. Custom Loss is now supported with MXNet backend. PR

Bug Fixes

  1. Fix crashing softmax operator on GPUs. PR
  2. 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. >>

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

  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. 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
  6. Keras-MXNet benchmark results -https://github.com/awslabs/keras-apache-mxnet/tree/master/benchmark