* fixing examples * fixing examples and adding READMEs fixing examples and adding READMEs fixing examples and adding READMEs fixing examples and adding READMEs add missing files fixed some bugs in readmes fixed some bugs in readmes fixed some spelling mistakes update update * removing images and fixing spelling mistakes * removing images and fixing spelling mistakes * updating links * Adding license header * empty commit * Add missing license headers * Adding changes requested by ChaiBapchya
MXNet Examples
This page contains a curated list of awesome MXNet examples, tutorials and blogs. It is inspired by awesome-php and awesome-machine-learning. See also Awesome-MXNet for a similar list.
- Contributing
- List of examples
- List of tutorials
- Machine Learning Challenge Winning Solutions
- Tools with MXnet
Contributing
If you want to contribute to this list and the examples, please open a new pull request.
Examples
Example applications or scripts should be submitted in this example folder.
Tutorials
If you have a tutorial idea for the website, download the Jupyter notebook tutorial template.
Tutorial location
Notebook tutorials should be submitted in the docs/tutorials folder, so that they maybe rendered in the web site's tutorial section.
Do not forget to udpdate the docs/tutorials/index.md for your tutorial to show up on the website.
Tutorial formatting
The site expects the format to be markdown, so export your notebook as a .md via the Jupyter web interface menu (File > Download As > Markdown). Then, to enable the download notebook button in the web site's UI (example), add the following as the last line of the file (example):
<!-- INSERT SOURCE DOWNLOAD BUTTONS -->
If you want some lines to show-up in the markdown but not in the generated notebooks, add this comment <!--notebook-skip-line--> after your . Like this:
<!--notebook-skip-line-->
Typically when you have a plt.imshow() you want the image tag [png](img.png) in the .md but not in the downloaded notebook as the user will re-generate the plot at run-time.
Tutorial tests
As part of making sure all our tutorials are running correctly with the latest version of MXNet, each tutorial is run automatically through a python2 and python3 jupyter notebook kernel in the CI, in a GPU environment, checking for errors and warnings.
Add your own test here tests/tutorials/test_tutorials.py. (If you forget, don't worry your PR will not pass the sanity check).
If your tutorial depends on specific packages, simply add them to this provisionning script: ci/docker/install/ubuntu_tutorials.sh
List of examples
Languages Binding Examples
- MXNet C++ API
- C++ examples - Example code for using C++ interface, including NDArray, symbolic layer and models.
- MXNet Python API
- MXNet Scala API
- MXNet R API
- MXNet Julia API
- MXNet Perl API
- go-mxnet-predictor - Go binding for inference
- MXNet JNI - JNI(Android) library
- MXNet Amalgamation - Amalgamation (entire library in a single file)
- MXNet Javascript - MXNetJS: Javascript Package for Deep Learning in Browser (without server)
Deep Learning Examples in the MXNet Project Repository
- Autoencoder - unsupervised feature learning
- Bayesian Methods - various examples related to Bayesian Methods
- Bidirectional LSTM Sorting - use a bidirectional LSTM to sort an array
- Caffe - how to call Caffe operators from MXNet
- CNN for Chinese Text Classification - a MXnet example for Chinese text classification
- CNN for Text Classification - a MXnet example for text classification
- CTC with MXNet - a modification of warpctc
- Deep Embedded Clustering - unsupervised deep embedding for clustering analysis
- Dense-Sparse-Dense Training - Dense-Sparse-Dense Training for deep neural networks
- Fully Convolutional Networks - fully convolutional networks for semantic segmentation
- Generative Adversarial Networks with R - GAN examples in R
- Gluon Examples - several examples using the Gluon API
- Style Transfer - a style transfer example using gluon
- Word Language Model - an example that trains a multi-layer RNN on the Penn Treebank language modeling benchmark
- SN-GAN - an example that utilizes spectral normalization to train GAN(Generative adversarial network) using Gluon API
- Image Classification with R - image classification on MNIST,CIFAR,ImageNet-1k,ImageNet-Full, with multiple GPU and distributed training.
- Kaggle 1st national data science bowl - a MXnet example for Kaggle Nation Data Science Bowl 1
- Kaggle 2nd national data science bowl - a tutorial for Kaggle Second Nation Data Science Bowl
- Memory Cost - a script to show the memory cost of different allocation strategies
- Model Parallelism - various model parallelism examples
- Model Parallelism with LSTM - an example showing how to do model parallelism with a LSTM
- Model Parallelism with Matrix Factorization - a matrix factorization algorithm for recommendations
- Module API - examples with the Python Module API
- Multi-task Learning - how to use MXNet for multi-task learning
- MXNet Adversarial Variational Autoencoder - combines a variational autoencoder with a generative adversarial network
- Noise-contrastive estimation loss - used to speedup multi-class classification
- Neural Style - use deep learning for style transfer in images
- Numpy Operator Customization - Examplea on quick customize new ops with Numpy
- Profiling - generate profiling results in json files
- Python How To - a variety of Python examples
- Quantization and Calibration Examples - examples of quantizing a FP32 model to INT8 and performing low-precision inference with Intel MKL-DNN on CPU or cuDNN on GPU
- R-CNN - R-CNN with distributed implementation and data parallelization
- Recommender Systems - examples of how to build various kinds of recommender systems
- Reinforcement Learning - a variety of reinforcement learning examples
- A3C
- DDPG - example of training DDPG for CartPole
- DQN - examples of training DQN and Double DQN to play Atari Games
- Parallel Advantage-Actor Critic
- Restricted Boltzmann Machine - an example of the binary restricted Boltzmann machine learning MNIST
- RNN Time Major - RNN implementation with Time-major layout
- Recurrent Neural Net - creating recurrent neural networks models using high level
mxnet.rnninterface - Sparse - a variety of sparse examples
- Single Shot MultiBox Detector - SSD object recognition example
- Stochastic Depth - implementation of the stochastic depth algorithm
- Support Vector Machine - an SVM example using MNIST
- Variational Auto Encoder - implements the Variational Auto Encoder in MXNet using MNIST
Other Deep Learning Examples with MXNet
- Face Recognition with ArcFace - ONNX model for face recognition with notebooks for training, validating and running inference in MXNet by abhinavs95
- Chinese plate recognition - Recognize Chinese vehicle plate, by imistyrain
- Fast R-CNN by Jian Guo
- "End2End Captcha Recognition (OCR)" by xlvector github link Blog in Chinese
- "Prediction step of xlvector's lstm ocr" by melody-rain github link Blog in Chinese
- "Solving classification + regression with MXnet in Multi Input + Multi Obj" by xlvector github link Blog in Chinese
- "Learn to sort by LSTM" by xlvector github link Blog in Chinese
- Neural Art using extremely lightweight (<500K) neural network Lightweight version of mxnet neural art implementation by Pavel Gonchar
- Neural Art with generative networks by zhaw
- Faster R-CNN in MXNet with distributed implementation and data parallelization
- Asynchronous Methods for Deep Reinforcement Learning in MXNet by zmonoid
- Deep Q-learning in MXNet by zmonoid
- Face Detection with End-to-End Integration of a ConvNet and a 3D Model (ECCV16) by tfwu, source code for paper Yunzhu Li, Benyuan Sun, Tianfu Wu and Yizhou Wang, "Face Detection with End-to-End Integration of a ConvNet and a 3D Model", ECCV 2016 https://arxiv.org/abs/1606.00850
- End-to-End Chinese plate recognition base on MXNet by szad670401
- Reproduce ResNet-v2 (Identity Mappings in Deep Residual Networks) using MXNet by tornadomeet
- Learning similarity among images in MXNet by xlvector in Chinese. Github link
- Matrix decomposition (SVD) with MXNet by xlvector in Chinese. Github link
- MultiGPU enabled image generative models (GAN and DCGAN) by Tianqi Chen
- Deep reinforcement learning for playing flappybird by mxnet by LIHaoran
- Neural Style in Markov Random Field (MRF) and Perceptual Losses Realtime transfer by zhaw
- MTCNN Face keypoints detection and alignment (github) in Chinese by pangyupo
- SSD: Single Shot MultiBox Object Detector by zhreshold
- Fast Neural Style in Scala by Ldpe2G
- LSTM Human Activity Recognition by Ldpe2G
- Visual Question Answering by liuzhi136
- Deformable ConvNets (github) by MSRACVer
- OCR with bi-LSTM and CTC Loss in Gluon by ThomasDelteil
- Visual Search with Gluon and HNSWlib, by ThomasDelteil, online demo here
- MXNet-face - Using MXNet for a face-related algorithm by tornadomeet where the single model gets 97.13%+-0.88% accuracy on LFW, and with only 20MB size
IPython Notebooks
- Predict with Pre-trained model - Notebook on how to predict with pretrained model.
- composite symbol - A demo of how to composite a symbolic Inception-BatchNorm Network
- cifar-10 recipe - A step by step demo of how to use MXNet
- cifar-100 - A demo of how to train a 75.68% accuracy CIFAR-100 model
- simple bind - A demo of low level training API.
- Multi task tutorial - A demo of how to train and predict multi-task network on both MNIST and your own dataset.
- class active maps - A demo of how to localize the discriminative regions in an image using global average pooling (GAP) in CNNs.
- DMLC MXNet Notebooks DMLC's repo for various notebooks ranging from basic usages of MXNet to state-of-the-art deep learning applications.
- AWS Seoul Summit 2017 Demos The demo codes and ipython notebooks in AWS Seoul Summit 2017.
- Character-level CNN for text classification Performing category classification on Amazon reviews using Gluon and character-level Convolutional Neural Networks. Online demo here
Mobile App Examples
- MXNet Android Classification App - Image classification on Android with MXNet.
- MXNet iOS Classification App - Image classification on iOS with MXNet.
- Compile MXnet on Xcode (in Chinese) - a step-by-step tutorial of compiling MXnet on Xcode for iOS app
Web Predictive Services
- MXNet Shinny - Source code for quickly creating a Shiny R app to host online image classification.
- Machine Eye - Web service for local image file/image URL classification without uploading.
List of tutorials
GPU Technology Conference 2016 Hands-on session
Deep learning for hackers with MXNet
- Deep learning for hackers with MXNet (1) GPU installation and MNIST English Chinese - a tutorial of installing MXnet with GPU and introduction to deep learning by MNIST example.
- Deep learning for hackers with MXNet (2): Neural art English Chinese - a tutorial of generating Van Gogh style cat paintings.
MXNet on the cloud
- Setup Amazon AWS GPU instance with MXnet - AWS GPU instance setup with GPU (CUDA with latest cuDNN and S3 support)
- Intro Guide to AWS (MXNet with Julia) - A step-by-step guide of using spot instances with Amazon Web Services (AWS) to help you save money when training DSB models on MXNet by Mike Kim
- Building Deep Neural Networks in the Cloud with Azure GPU VMs, MXNet and Microsoft R Server by Cortana Intelligence and ML Blog Team at Microsoft
- Applying Deep Learning at Cloud Scale, with Microsoft R Server & Azure Data Lake by Cortana Intelligence and ML Blog Team at Microsoft
- Training Deep Neural Neural Networks on ImageNet Using Microsoft R Server and Azure GPU VMs by Cortana Intelligence and ML Blog Team at Microsoft
- Cloud-Scale Text Classification with Convolutional Neural Networks on Microsoft Azure by Cortana Intelligence and ML Blog Team at Microsoft
- Distributed Deep Learning Made Easy at AWS/Amazon for deploying deep learning clusters using MXNet
Kaggle tutorials
- Kaggle 2nd Annual Data Science Bowl End-to-End Deep Learning Tutorial (Python) - an end-to-end python tutorial for Kaggle heart disease diagnose competition (public leaderboard score 0.0392)
- Kaggle 2nd Annual Data Science Bowl End-to-End Deep Learning Tutorial (R) - an end-to-end R tutorial for Kaggle heart disease diagnose competition
- Dogs vs. Cats classification with mxnet and R - end-to-end (not winning) tutorial with an example of fine-tuning in R
Learning Note
- Learning Note in Chinese - MXNet learning note in Chinese.
- Getting Started with MXNet by indico.io (Chinese Translation MXNet实践 by 侠天 )
- {mxnet} R package from MXnet, an intuitive Deep Learning framework including CNN & RNN by TJO
- MXnet with R: combined power of deep learning in Chinese by Tong He
- Understand MXNet dependency engine in Chinese by Yu Yang
Machine Learning Challenge Winning Solutions
- Dmitrii Tsybulevskii, 1st place of the Yelp Restaurant Photo Classification. Link to the Kaggle interview.
Tools with MXnet
- TensorFuse - Common interface for Theano, CGT, TensorFlow, and mxnet (experimental) by dementrock
- MXnet-face - Using mxnet for face-related algorithm by tornadomeet where the single model get 97.13%+-0.88% accuracy on LFW, and with only 20MB size.
- MinPy - Pure numpy practice with third party operator Integration and MXnet as backend for GPU computing
- MXNet Model Server - a flexible and easy to use tool for serving Deep Learning models