singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kaip...@apache.org
Subject [6/8] incubator-singa git commit: SINGA-305 - Add jupyter notebooks for SINGA V1 tutorial
Date Wed, 15 Mar 2017 09:16:32 GMT
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/5144bcf1/doc/en/docs/notebook/index.ipynb
----------------------------------------------------------------------
diff --git a/doc/en/docs/notebook/index.ipynb b/doc/en/docs/notebook/index.ipynb
index c252ba2..0c29187 100644
--- a/doc/en/docs/notebook/index.ipynb
+++ b/doc/en/docs/notebook/index.ipynb
@@ -4,47 +4,117 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "![Apache Singa](http://singa.apache.org/en/_static/singa.png)"
+    "![Apache Singa](http://singa.apache.org/en/_static/singa.png)\n",
+    "\n",
+    "# A Tutorial of SINGA V1\n",
+    "\n",
+    "Welcome to this tutorial for Apache Incubator-singa.\n",
+    "Please install [conda and SINGA](./installation.ipynb) before running the notebooks.\n",
+    "\n",
+    "## Outline\n",
+    "\n",
+    "* Introduction and installation\n",
+    "* SINGA classes\n",
+    "  * [Core classes](./core.ipynb) - Tensor and Device\n",
+    "  * [Model classes](./model.ipynb) - Layer, Loss, Metric, FeedForwardNet, Optimzier,
Initializer\n",
+    "* Simple models \n",
+    "  * [Linear Regression](./regression.ipynb)\n",
+    "  * [Multi-layer Perceptron](./mlp.ipynb)\n",
+    "* Deep learning models\n",
+    "  * [Convolutional Neural Network (CNN)](./cnn.ipynb)\n",
+    "  * [Recurrent Neural Networks (RNN)](./rnn.ipynb) (WIP)\n",
+    "  * [Restricted Boltzmann Machine (RBM)](./rbm.ipynb)\n",
+    "* [Distributed training](./distributed.ipynb) (WIP)\n",
+    "* [Rafiki](./rafiki.ipynb) (WIP)"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "Welcome to this tutorial for Apache Incubator-singa using Jupyter Notebook.\n",
+    "## Introduction \n",
+    "### Training and Inference of deep learning models\n",
+    "\n",
+    "#### Training objective\n",
     "\n",
-    "Please install [PySINGA](http://singa.apache.org/en/docs/installation.html#install-pysinga)
before running these tutorials.\n",
+    "$\\min_{\\theta} \\sum_{<x, y>\\in D}L(f(x|\\theta), y)$\n",
     "\n",
-    "1. [Regression](./regression.ipynb )\n",
+    "Training procedure\n",
+    "1. randomly initialize $\\theta$\n",
+    "2. get a mini-batch of data $\\{<x, y>\\}$ and compute $\\frac{\\partial L}{\\partial
\\theta}$\n",
+    "3. $\\theta \\leftarrow \\theta - \\alpha \\frac{\\partial L}{\\partial \\theta}$\n",
+    "4. repeat 2-3 until converge, i.e., $||\\frac{\\partial L}{\\partial \\theta}|| <
\\epsilon$ \n",
     "\n",
-    "2. [MLP Tutorial](./mlp.ipynb)\n",
+    "<img src=\"./static/sgd.png\" width=\"400px\"/>\n",
     "\n",
-    "3. [RBM Tutorial](./rbm.ipynb)\n",
+    "#### Back-propagation for gradient computation\n",
     "\n",
+    "<img src=\"./static/bp.PNG\" width=\"300px\"/> \n",
     "\n",
-    "To learn more about Jupyter, please check [IPython in Depth](https://www.youtube.com/watch?v=xe_ATRmw0KM).\n",
+    "#### Popular deep learning models\n",
     "\n",
-    "If you want to use PySINGA and jupyter notebooks in virtual environment, please use
conda virtual environment and install the following extension. Then you can select the kernel
of the virtual environment in the browser. "
+    "<img src=\"./static/models.PNG\" width=\"200px\"/>\n",
+    "\n",
+    "\n",
+    "\n"
    ]
   },
   {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [],
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### SINGA V1\n",
+    "#### Software Stack\n",
+    "\n",
+    "<img src=\"http://singa.apache.org/en/_static/images/singav1-sw.png\" width=\"500px\"/>\n",
+    "\n",
+    "#### Progress\n",
+    "\n",
+    "|Components|Feature|Status|\n",
+    "|:---------|:------|:-----|\n",
+    "|Core |Tensor implementation|V1.0|\n",
+    "|     |Device implementation (CppCPU, CudaGPU, OpenclGPU) |V1.1|\n",
+    "|Model|Basic layers for CNN and RNN| V1.0|\n",
+    "|     |Basic loss and metric functions|V1.0|\n",
+    "|     |Basic optimizer and initializers |V1.0|\n",
+    "|IO   |Message paasing via socket| V1.0|\n",
+    "|Installation| From source on Linux and Mac|V1.0|\n",
+    "|            | From source on Windows|V1.1|\n",
+    "|            | From wheel on Linux and Mac|V1.0|\n",
+    "|            | From debian package on Ubuntu |V1.1|\n",
+    "|            | Docker images | V1.1|\n",
+    "|            | AWS AMI       | V1.1|\n",
+    "\n",
+    "#### Schedule\n",
+    "|Components|Feature|Status|\n",
+    "|:---------|:------|:-----|\n",
+    "|Core     |Tensor API = Numpy API| V1.2|\n",
+    "| |Operation scheduling and memory optimization| V1.3|\n",
+    "|Model | To support more vison, NLP examples| V1.2|\n",
+    "|      | General neural net API| V1.2|\n",
+    "|      | To support reinforcement learning examples| V1.3|\n",
+    "|      | Auto-grad + Functional API | TBD|\n",
+    "|IO | HDFS integration  |V1.3|\n",
+    "|Server| Consistency and communication optimization |V1.2|   \n",
+    "|      |Message passing via Infiniband |V1.2|  \n",
+    "|Installation | From wheel on Windows| V1.2|\n",
+    "|             | From debian on Linux | V1.2|\n"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
    "source": [
-    "conda install nb_conda_kernel"
+    "## Next: [SINGA core classes](./core.ipynb)"
    ]
   }
  ],
  "metadata": {
   "anaconda-cloud": {},
   "kernelspec": {
-   "display_name": "Python [default]",
+   "display_name": "Python [conda env:conda]",
    "language": "python",
-   "name": "python2"
+   "name": "conda-env-conda-py"
   },
   "language_info": {
    "codemirror_mode": {
@@ -56,9 +126,9 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython2",
-   "version": "2.7.12"
+   "version": "2.7.13"
   }
  },
  "nbformat": 4,
- "nbformat_minor": 1
+ "nbformat_minor": 2
 }

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/5144bcf1/doc/en/docs/notebook/installation.ipynb
----------------------------------------------------------------------
diff --git a/doc/en/docs/notebook/installation.ipynb b/doc/en/docs/notebook/installation.ipynb
new file mode 100644
index 0000000..65093dc
--- /dev/null
+++ b/doc/en/docs/notebook/installation.ipynb
@@ -0,0 +1,93 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "The easiast way to install SINGA is via [conda](https://conda.io/docs/).\n",
+    "\n",
+    "## Install Conda\n",
+    "\n",
+    "If you haven't install conda, you can install it via\n",
+    "\n",
+    "* Linux 64\n",
+    "\n",
+    "      wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O
miniconda.sh\n",
+    "      bash miniconda.sh\n",
+    "\n",
+    "* Mac OSX\n",
+    "\n",
+    "      wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh  miniconda.sh\n",
+    "      bash miniconda.sh\n",
+    "        \n",
+    "* Windows (not supported for the moment) \n",
+    "\n",
+    "## Install SINGA\n",
+    "\n",
+    "With Conda installed, you can install SINGA via\n",
+    "\n",
+    "* SINGA for Linux\n",
+    "  * CPU Version\n",
+    "      \n",
+    "        conda install -c nusdbsystem singa\n",
+    "      \n",
+    "  * GPU Version\n",
+    "      \n",
+    "        conda install -c nusdbystem singa-cudax.y-cudnnz\n",
+    "    \n",
+    "    where <x,y,z> specifies the cuda and cuDNN version, which could be (cuda8.0,
cudnn5), (cuda7.5, cudnn5) or (cuda7.5, cudnn4)\n",
+    "    \n",
+    "    \n",
+    "* SINGA for MacOSX (CPU only)\n",
+    "  \n",
+    "      conda config --add channels conda-forge\n",
+    "      conda install -c nusdbsystem singa\n",
+    "      \n",
+    "      \n",
+    "## Install Jupyter Notebook and Other Packages\n",
+    "\n",
+    "      conda install --file requirements.txt\n",
+    "    \n",
+    "To learn more about Jupyter, please check [IPython in Depth](https://www.youtube.com/watch?v=xe_ATRmw0KM).\n",
+    "\n",
+    "\n",
+    "## Run the notebooks\n",
+    "\n",
+    "Download the [notebooks](https://github.com/apache/incubator-singa/tree/master/doc/en/docs/notebook)
and start the jupyter\n",
+    "\n",
+    "    jupyter notebook"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "anaconda-cloud": {},
+  "kernelspec": {
+   "display_name": "Python [conda env:conda]",
+   "language": "python",
+   "name": "conda-env-conda-py"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 2
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython2",
+   "version": "2.7.13"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}


Mime
View raw message