MXNet v1.2.0 Release Notes

Release Date: 2018-05-21 // almost 6 years ago
  • ๐ŸŒฒ MXNet Change Log

    1.2.0

    ๐Ÿ†• New Features - Added Scala Inference APIs

    • Implemented new Scala Inference APIs which offer an easy-to-use, Scala Idiomatic and thread-safe high level APIs for performing predictions with deep learning models trained with MXNet (#9678). Implemented a new ImageClassifier class which provides APIs for classification tasks on a Java BufferedImage using a pre-trained model you provide (#10054). Implemented a new ObjectDetector class which provides APIs for object and boundary detections on a Java BufferedImage using a pre-trained model you provide (#10229).

    ๐Ÿ†• New Features - Added a Module to Import ONNX models into MXNet

    • Implemented a new ONNX module in MXNet which offers an easy to use API to import ONNX models into MXNet's symbolic interface (#9963). Checkout the example on how you could use this API to import ONNX models and perform inference on MXNet. Currently, the ONNX-MXNet Import module is still experimental. Please use it with caution.

    ๐Ÿ†• New Features - Added Support for Model Quantization with Calibration

    • Implemented model quantization by adopting the TensorFlow approach with calibration by borrowing the idea from Nvidia's TensorRT. The focus of this work is on keeping quantized models (ConvNets for now) inference accuracy loss under control when compared to their corresponding FP32 models. Please see the example on how to quantize a FP32 model with or without calibration (#9552). Currently, the Quantization support is still experimental. Please use it with caution.

    ๐Ÿ†• New Features - MKL-DNN Integration

    • MXNet now integrates with Intel MKL-DNN to accelerate neural network operators: Convolution, Deconvolution, FullyConnected, Pooling, Batch Normalization, Activation, LRN, Softmax, as well as some common operators: sum and concat (#9677). This integration allows NDArray to contain data with MKL-DNN layouts and reduces data layout conversion to get the maximal performance from MKL-DNN. Currently, the MKL-DNN integration is still experimental. Please use it with caution.

    ๐Ÿ†• New Features - Added Exception Handling Support for Operators

    • ๐Ÿ‘ป Implemented Exception Handling Support for Operators in MXNet. MXNet now transports backend C++ exceptions to the different language front-ends and prevents crashes when exceptions are thrown during operator execution (#9681).

    ๐Ÿ†• New Features - Enhanced FP16 support

    • โž• Added support for distributed mixed precision training with FP16. It supports storing of master copy of weights in float32 with the multi_precision mode of optimizers (#10183). Improved speed of float16 operations on x86 CPU by 8 times through F16C instruction set. Added support for more operators to work with FP16 inputs (#10125, #10078, #10169). Added a tutorial on using mixed precision with FP16 (#10391).

    ๐Ÿ†• New Features - Added Profiling Enhancements

    • โœจ Enhanced built-in profiler to support native Intelยฎ๏ธ VTuneโ„ข๏ธ Amplifier objects such as Task, Frame, Event, Counter and Marker from both C++ and Python -- which is also visible in the Chrome tracing view(#8972). Added Runtime tracking of symbolic and imperative operators as well as memory and API calls. Added Tracking and dumping of aggregate profiling data. Profiler also no longer affects runtime performance when not in use.

    ๐Ÿ’ฅ Breaking Changes

    • ๐Ÿ”„ Changed Namespace for MXNet scala from ml.dmlc.mxnet to org.apache.mxnet (#10284).
    • Changed API for the Pooling operator from mxnet.symbol.Pooling(data=None, global_pool=_Null, cudnn_off=_Null, kernel=_Null, pool_type=_Null, pooling_convention=_Null, stride=_Null, pad=_Null, name=None, attr=None, out=None, **kwargs) to mxnet.symbol.Pooling(data=None, kernel=_Null, pool_type=_Null, global_pool=_Null, cudnn_off=_Null, pooling_convention=_Null, stride=_Null, pad=_Null, name=None, attr=None, out=None,**kwargs). This is a breaking change when kwargs are not provided since the new api expects the arguments starting from global_pool at the fourth position instead of the second position. (#10000).

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fixed tests - Flakiness/Bugs - (#9598, #9951, #10259, #10197, #10136, #10422). Please see: Tests Improvement Project
    • Fixed cudnn_conv and cudnn_deconv deadlock (#10392).
    • ๐Ÿ›  Fixed a race condition in io.LibSVMIter when batch size is large (#10124).
    • ๐Ÿ›  Fixed a race condition in converting data layouts in MKL-DNN (#9862).
    • ๐Ÿ›  Fixed MKL-DNN sigmoid/softrelu issue (#10336).
    • ๐Ÿ›  Fixed incorrect indices generated by device row sparse pull (#9887).
    • ๐Ÿ›  Fixed cast storage support for same stypes (#10400).
    • ๐Ÿ›  Fixed uncaught exception for bucketing module when symbol name not specified (#10094).
    • ๐Ÿ›  Fixed regression output layers (#9848).
    • ๐Ÿ›  Fixed crash with mx.nd.ones (#10014).
    • Fixed sample_multinomial crash when get_prob=True (#10413).
    • ๐Ÿ›  Fixed buggy type inference in correlation (#10135).
    • ๐Ÿ›  Fixed race condition for CPUSharedStorageManager->Free and launched workers at iter init stage to avoid frequent relaunch (#10096).
    • ๐Ÿ›  Fixed DLTensor Conversion for int64 (#10083).
    • ๐Ÿ›  Fixed issues where hex symbols of the profiler were not being recognized by chrome tracing tool(#9932)
    • ๐Ÿ›  Fixed crash when profiler was not enabled (#10306)
    • ๐Ÿ›  Fixed ndarray assignment issues (#10022, #9981, #10468).
    • ๐Ÿ›  Fixed incorrect indices generated by device row sparse pull (#9887).
    • ๐Ÿ›  Fixed print_summary bug in visualization module (#9492).
    • ๐Ÿ›  Fixed shape mismatch in accuracy metrics (#10446).
    • ๐Ÿ›  Fixed random samplers from uniform and random distributions in R bindings (#10450).
    • ๐Ÿ›  Fixed a bug that was causing training metrics to be printed as NaN sometimes (#10437).
    • ๐Ÿ›  Fixed a crash with non positive reps for tile ops (#10417).

    ๐ŸŽ Performance Improvements

    • On average, after the MKL-DNN change, the inference speed of MXNet + MKLDNN outperforms MXNet + OpenBLAS by a factor of 32, outperforms MXNet + MKLML by 82% and outperforms MXNet + MKLML with the experimental flag by 8%. The experiments were run for the image classifcation example, for different networks and different batch sizes.
    • ๐Ÿ‘Œ Improved sparse SGD, sparse AdaGrad and sparse Adam optimizer speed on GPU by 30x (#9561, #10312, #10293, #10062).
    • ๐Ÿ‘Œ Improved sparse.retain performance on CPU by 2.5x (#9722)
    • Replaced std::swap_ranges with memcpy (#10351)
    • Implemented DepthwiseConv2dBackwardFilterKernel which is over 5x faster (#10098)
    • Implemented CPU LSTM Inference (#9977)
    • โž• Added Layer Normalization in C++ (#10029)
    • ๐ŸŽ Optimized Performance for rtc (#10018)
    • ๐Ÿ‘Œ Improved CPU performance of ROIpooling operator by using OpenMP (#9958)
    • Accelerated the calculation of F1 (#9833)

    API Changes

    • Block.save_params now match parameters according to model structure instead of names to avoid prefix mismatching problems during saving and loading (#10511).
    • โž• Added an optional argument ctx to mx.random.seed. Seeding with ctx option produces random number sequence independent of device id. (#10367).
    • โž• Added copy flag for astype (#10347).
    • โž• Added context parameter to Scala Infer API - ImageClassifier and ObjectDetector (#10252).
    • โž• Added axes support for dropout in gluon (#10032).
    • โž• Added default ctx to cpu for gluon.Block.load_params (#10160).
    • โž• Added support for variable sequence length in gluon.RecurrentCell (#9934).
    • โž• Added convenience fluent method for squeeze op (#9734).
    • Made array.reshape compatible with numpy (#9790).
    • โž• Added axis support and gradient for L2norm (#9740).

    ๐Ÿ“œ Sparse Support

    • โž• Added support for multi-GPU training with row_sparse weights using device KVStore (#9987).
    • โž• Added Module.prepare API for multi-GPU and multi-machine training with row_sparse weight (#10285).
    • โž• Added deterministic option for contrib.SparseEmbedding operator (#9846).
    • ๐Ÿ“œ Added sparse.broadcast_mul and sparse.broadcast_div with CSRNDArray and 1-D dense NDArray on CPU (#10208).
    • โž• Added sparse support for Custom Operator (#10374).
    • โž• Added Sparse feature for Perl (#9988).
    • โž• Added force_deterministic option for sparse embedding (#9882).
    • โž• Added sparse.where with condition being csr ndarray (#9481).

    ๐Ÿ—„ Deprecations

    • Deprecated profiler_set_state (#10156).

    Other Features

    • โž• Added constant parameter for gluon (#9893).
    • โž• Added contrib.rand.zipfian (#9747).
    • โž• Added Gluon PreLU, ELU, SELU, Swish activation layers for Gluon (#9662)
    • โž• Added Squeeze Op (#9700).
    • โž• Added multi-proposal operator (CPU version) and fixed bug in multi-proposal operator (GPU version) (#9939).
    • โž• Added in Large-Batch SGD with a warmup, and a LARS startegy (#8918).
    • โž• Added Language Modelling datasets and Sampler (#9514).
    • โž• Added instance norm and reflection padding to Gluon (#7938).
    • โž• Added micro-averaging strategy for F1 metric (#9777).
    • โž• Added Softsign Activation Function (#9851).
    • โž• Added eye operator, for default storage type (#9770).
    • โž• Added TVM bridge support to JIT NDArray Function by TVM (#9880).
    • โž• Added float16 support for correlation operator and L2Normalization operator (#10125, #10078).
    • โž• Added random shuffle implementation for NDArray (#10048).
    • โž• Added load from buffer functions for CPP package (#10261).

    Usability Improvements

    • โž• Added embedding learning example for Gluon (#9165).
    • โž• Added tutorial on how to use data augmenters (#10055).
    • โž• Added tutorial for Data Augmentation with Masks (#10178).
    • โž• Added LSTNet example (#9512).
    • โž• Added MobileNetV2 example (#9614).
    • โž• Added tutorial for Gluon Datasets and DataLoaders (#10251).
    • โž• Added Language model with Google's billion words dataset (#10025).
    • โž• Added example for custom operator using RTC (#9870).
    • ๐Ÿ‘Œ Improved image classification examples (#9799, #9633).
    • Added reshape predictor function to c_predict_api (#9984).
    • โž• Added guide for implementing sparse ops (#10081).
    • โž• Added naming tutorial for gluon blocks and parameters (#10511).

    Known Issues

    • MXNet crash when built with USE_GPERFTOOLS = 1 (#8968).
    • โœ… DevGuide.md in the 3rdparty submodule googletest licensed under CC-BY-2.5.
    • ๐Ÿ‘ป Incompatibility in the behavior of MXNet Convolution operator for certain unsupported use cases: Raises an exception when MKLDNN is enabled, fails silently when it is not.
    • MXNet convolution generates wrong results for 1-element strides (#10689).
    • Tutorial on fine-tuning an ONNX model fails when using cpu context.
    • ๐Ÿ— CMake build ignores the USE_MKLDNN flag and doesn't build with MKLDNN support even with -DUSE_MKLDNN=1. To workaround the issue please see: #10801.
    • โšก๏ธ Linking the dmlc-core library fails with CMake build when building with USE_OPENMP=OFF. To workaround the issue, please use the updated CMakeLists in dmlc-core unit tests directory: dmlc/dmlc-core#396. You can also workaround the issue by using make instead of cmake when building with USE_OPENMP=OFF.

    ๐Ÿš€ For more information and examples, see full release notes