You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/11/28 00:49:15 UTC

[GitHub] ThomasDelteil commented on a change in pull request #13411: [WIP] Gluon end to end tutorial

ThomasDelteil commented on a change in pull request #13411: [WIP] Gluon end to end tutorial
URL: https://github.com/apache/incubator-mxnet/pull/13411#discussion_r236902654
 
 

 ##########
 File path: docs/tutorials/gluon/gluon_from_experiment_to_deploymen.md
 ##########
 @@ -0,0 +1,400 @@
+# Gluon: from experiment to deployment, an end to end example
+
+## Overview
+
+MXNet Gluon API comes with a lot of great features and it can provide you everything you need from experiment to deploy the model.
+In this tutorial, we will walk you through a common used case on how to build a model using gluon, train it on your data, and deploy it for inference.
+
+Let's say you want to build a service that provides flower species recognition. A common use case is, you don't have enough data to train a good model like ResNet50.
+What you can do is utilize pre-trained model from Gluon, tweak the model according to your neeed, fine-tune the model on your small dataset, and deploy the model to integrate with your service.
+
+We will use the [Oxford 102 Category Flower Dateset](http://www.robots.ox.ac.uk/~vgg/data/flowers/102/) as an example to show you the steps.
+
+## Prepare training data
+
+You can use this [script](https://github.com/Arsey/keras-transfer-learning-for-oxford102/blob/master/bootstrap.py) to download and organize your data into train, test, and validation sets. Simply run:
+```python
+python bootstrap.py
+```
+
+Now your data will be organized into the following format, all the images belong to the same category will be put together
+```
+data
+├── train
+│   ├── 0
+│   │   ├── image_06736.jpg
+│   │   ├── image_06741.jpg
+...
+│   ├── 1
+│   │   ├── image_06755.jpg
+│   │   ├── image_06899.jpg
+...
+├── test
+│   ├── 0
+│   │   ├── image_00731.jpg
+│   │   ├── image_0002.jpg
+...
+│   ├── 1
+│   │   ├── image_00036.jpg
+│   │   ├── image_05011.jpg
+
+```
+
+
+# Training using Gluon
+### Define Hyper-paramerters
+Now let's first import neccesarry packages:
+```python
+import mxnet as mx
+import numpy as np
+import os, time
+
+from mxnet import gluon, init
+from mxnet import autograd as ag
+from mxnet.gluon import nn
+from mxnet.gluon.data.vision import transforms
+from gluoncv.model_zoo import get_model
+```
+
+and define the hyper parameter we will use for fine-tuning:
 
 Review comment:
   hyperparameters* 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services