safrooze commented on a change in pull request #10959: [MXNET-423] Gluon Model 
Zoo Pre Trained Model tutorial

 File path: docs/tutorials/gluon/
 @@ -0,0 +1,373 @@
+# Using pre-trained models in MXNet
+In this tutorial we will see how to use multiple pre-trained models with 
Apache MXNet. First, let's download three images classification models from the 
Apache MXNet [Gluon model 
+* **DenseNet-121** ([research paper](, 
improved state of the art on [ImageNet 
dataset]( in 2016.
+* **MobileNet** ([research paper](, 
MobileNets are based on a streamlined architecture that uses depth-wise 
separable convolutions to build light weight deep neural networks, suitable for 
mobile applications.
+* **ResNet-18** ([research paper](, the 
-152 version is the 2015 winner in multiple categories.
+Why would you want to try multiple models? Why not just pick the one with the 
best accuracy? As we will see later in the tutorial, even though these models 
have been trained on the same dataset and optimized for maximum accuracy, they 
do behave slightly differently on specific images. In addition, prediction 
speed and memory footprints can vary, and that's an important factor for many 
applications. By trying a few pretrained models, you have an opportunity to 
find a model that can be a good fit for solving your business problem.
+import mxnet as mx
+from mxnet import gluon, nd
+from mxnet.gluon.model_zoo import vision
+import matplotlib.pyplot as plt
+import numpy as np
+import json
+%matplotlib inline
+## Loading the model
+The [Gluon Model 
provides a collection of off-the-shelf models. You can get the ImageNet 
pre-trained model by using `pretrained=True`. 
+If you want to train on your own classification problem from scratch, you can 
get an untrained network with a specific number of classes using the `classes` 
parameter: for example `classes=10`.
 Review comment:
   Maybe add a line of code to show how to get the untrained model with 
different number of classes? Also perhaps emphasise that one cannot change 
number of classes and user pretrained as the same time.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to