blob: 1c802f7814e5b9708c99f63ec69dcf9be930138b [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<title>MXNet documentation — mxnet documentation</title>
<link crossorigin="anonymous" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"/>
<link href="_static/basic.css" rel="stylesheet" type="text/css">
<link href="_static/pygments.css" rel="stylesheet" type="text/css">
<link href="_static/mxnet.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="_static/underscore.js" type="text/javascript"></script>
<script src="_static/searchtools_custom.js" type="text/javascript"></script>
<script src="_static/doctools.js" type="text/javascript"></script>
<script src="_static/selectlang.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
<script type="text/javascript"> jQuery(function() { Search.loadIndex("/searchindex.js"); Search.init();}); </script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new
Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-96378503-1', 'auto');
ga('send', 'pageview');
</script>
<!-- -->
<!-- <script type="text/javascript" src="_static/jquery.js"></script> -->
<!-- -->
<!-- <script type="text/javascript" src="_static/underscore.js"></script> -->
<!-- -->
<!-- <script type="text/javascript" src="_static/doctools.js"></script> -->
<!-- -->
<!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> -->
<!-- -->
<link href="genindex.html" rel="index" title="Index">
<link href="search.html" rel="search" title="Search"/>
<link href="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/mxnet-icon.png" rel="icon" type="image/png"/>
</link></link></link></head>
<body background="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/mxnet-background-compressed.jpeg" role="document">
<div class="content-block"><div class="navbar navbar-fixed-top">
<div class="container" id="navContainer">
<div class="innder" id="header-inner">
<h1 id="logo-wrap">
<a href="./" id="logo"><img src="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/mxnet_logo.png"/></a>
</h1>
<nav class="nav-bar" id="main-nav">
<a class="main-nav-link" href="./install/index.html">Install</a>
<span id="dropdown-menu-position-anchor">
<a aria-expanded="true" aria-haspopup="true" class="main-nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button">Gluon <span class="caret"></span></a>
<ul class="dropdown-menu navbar-menu" id="package-dropdown-menu">
<li><a class="main-nav-link" href="./gluon/index.html">About</a></li>
<li><a class="main-nav-link" href="http://gluon.mxnet.io">Tutorials</a></li>
</ul>
</span>
<span id="dropdown-menu-position-anchor">
<a aria-expanded="true" aria-haspopup="true" class="main-nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button">API <span class="caret"></span></a>
<ul class="dropdown-menu navbar-menu" id="package-dropdown-menu">
<li><a class="main-nav-link" href="./api/python/index.html">Python</a></li>
<li><a class="main-nav-link" href="./api/scala/index.html">Scala</a></li>
<li><a class="main-nav-link" href="./api/r/index.html">R</a></li>
<li><a class="main-nav-link" href="./api/julia/index.html">Julia</a></li>
<li><a class="main-nav-link" href="./api/c++/index.html">C++</a></li>
<li><a class="main-nav-link" href="./api/perl/index.html">Perl</a></li>
</ul>
</span>
<span id="dropdown-menu-position-anchor-docs">
<a aria-expanded="true" aria-haspopup="true" class="main-nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button">Docs <span class="caret"></span></a>
<ul class="dropdown-menu navbar-menu" id="package-dropdown-menu-docs">
<li><a class="main-nav-link" href="./tutorials/index.html">Tutorials</a>
<li><a class="main-nav-link" href="./faq/index.html">FAQ</a></li>
<li><a class="main-nav-link" href="./architecture/index.html">Architecture</a></li>
<li><a class="main-nav-link" href="https://github.com/apache/incubator-mxnet/tree/1.1.0/example">Examples</a></li>
<li><a class="main-nav-link" href="./api/python/gluon/model_zoo.html">Gluon Model Zoo</a></li>
</li></ul>
</span>
<a class="main-nav-link" href="https://github.com/dmlc/mxnet">Github</a>
<span id="dropdown-menu-position-anchor-community">
<a aria-expanded="true" aria-haspopup="true" class="main-nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button">Community <span class="caret"></span></a>
<ul class="dropdown-menu navbar-menu" id="package-dropdown-menu-community">
<li><a class="main-nav-link" href="./community/index.html">Community</a></li>
<li><a class="main-nav-link" href="./community/contribute.html">Contribute</a></li>
<li><a class="main-nav-link" href="./community/powered_by.html">Powered By</a></li>
<li><a class="main-nav-link" href="http://discuss.mxnet.io">Discuss</a></li>
</ul>
</span>
<span id="dropdown-menu-position-anchor-version" style="position: relative"><a href="#" class="main-nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">Versions(1.1.0)<span class="caret"></span></a><ul id="package-dropdown-menu" class="dropdown-menu"><li><a class="main-nav-link" href=http://mxnet.incubator.apache.org/>1.1.0</a></li><li><a class="main-nav-link" href=http://mxnet.incubator.apache.org/versions/1.0.0/index.html>1.0.0</a></li><li><a class="main-nav-link" href=http://mxnet.incubator.apache.org/versions/0.12.1/index.html>0.12.1</a></li><li><a class="main-nav-link" href=http://mxnet.incubator.apache.org/versions/0.12.0/index.html>0.12.0</a></li><li><a class="main-nav-link" href=http://mxnet.incubator.apache.org/versions/0.11.0/index.html>0.11.0</a></li><li><a class="main-nav-link" href=http://mxnet.incubator.apache.org/versions/master/index.html>master</a></li></ul></span></nav>
<script> function getRootPath(){ return "./" } </script>
<div class="burgerIcon dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button"></a>
<ul class="dropdown-menu" id="burgerMenu">
<li><a href="./install/index.html">Install</a></li>
<li><a class="main-nav-link" href="./tutorials/index.html">Tutorials</a></li>
<li class="dropdown-submenu">
<a href="#" tabindex="-1">Community</a>
<ul class="dropdown-menu">
<li><a href="./community/index.html" tabindex="-1">Community</a></li>
<li><a href="./community/contribute.html" tabindex="-1">Contribute</a></li>
<li><a href="./community/powered_by.html" tabindex="-1">Powered By</a></li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#" tabindex="-1">API</a>
<ul class="dropdown-menu">
<li><a href="./api/python/index.html" tabindex="-1">Python</a>
</li>
<li><a href="./api/scala/index.html" tabindex="-1">Scala</a>
</li>
<li><a href="./api/r/index.html" tabindex="-1">R</a>
</li>
<li><a href="./api/julia/index.html" tabindex="-1">Julia</a>
</li>
<li><a href="./api/c++/index.html" tabindex="-1">C++</a>
</li>
<li><a href="./api/perl/index.html" tabindex="-1">Perl</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#" tabindex="-1">Docs</a>
<ul class="dropdown-menu">
<li><a href="./tutorials/index.html" tabindex="-1">Tutorials</a></li>
<li><a href="./faq/index.html" tabindex="-1">FAQ</a></li>
<li><a href="./architecture/index.html" tabindex="-1">Architecture</a></li>
<li><a href="https://github.com/apache/incubator-mxnet/tree/1.1.0/example" tabindex="-1">Examples</a></li>
<li><a href="./api/python/gluon/model_zoo.html" tabindex="-1">Gluon Model Zoo</a></li>
</ul>
</li>
<li><a href="./architecture/index.html">Architecture</a></li>
<li><a class="main-nav-link" href="https://github.com/dmlc/mxnet">Github</a></li>
<li id="dropdown-menu-position-anchor-version-mobile" class="dropdown-submenu" style="position: relative"><a href="#" tabindex="-1">Versions(1.1.0)</a><ul class="dropdown-menu"><li><a tabindex="-1" href=http://mxnet.incubator.apache.org/>1.1.0</a></li><li><a tabindex="-1" href=http://mxnet.incubator.apache.org/versions/1.0.0/index.html>1.0.0</a></li><li><a tabindex="-1" href=http://mxnet.incubator.apache.org/versions/0.12.1/index.html>0.12.1</a></li><li><a tabindex="-1" href=http://mxnet.incubator.apache.org/versions/0.12.0/index.html>0.12.0</a></li><li><a tabindex="-1" href=http://mxnet.incubator.apache.org/versions/0.11.0/index.html>0.11.0</a></li><li><a tabindex="-1" href=http://mxnet.incubator.apache.org/versions/master/index.html>master</a></li></ul></li></ul>
</div>
<div class="plusIcon dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button"><span aria-hidden="true" class="glyphicon glyphicon-plus"></span></a>
<ul class="dropdown-menu dropdown-menu-right" id="plusMenu"></ul>
</div>
<div id="search-input-wrap">
<form action="search.html" autocomplete="off" class="" method="get" role="search">
<div class="form-group inner-addon left-addon">
<i class="glyphicon glyphicon-search"></i>
<input class="form-control" name="q" placeholder="Search" type="text"/>
</div>
<input name="check_keywords" type="hidden" value="yes">
<input name="area" type="hidden" value="default"/>
</input></form>
<div id="search-preview"></div>
</div>
<div id="searchIcon">
<span aria-hidden="true" class="glyphicon glyphicon-search"></span>
</div>
<!-- <div id="lang-select-wrap"> -->
<!-- <label id="lang-select-label"> -->
<!-- <\!-- <i class="fa fa-globe"></i> -\-> -->
<!-- <span></span> -->
<!-- </label> -->
<!-- <select id="lang-select"> -->
<!-- <option value="en">Eng</option> -->
<!-- <option value="zh">中文</option> -->
<!-- </select> -->
<!-- </div> -->
<!-- <a id="mobile-nav-toggle">
<span class="mobile-nav-toggle-bar"></span>
<span class="mobile-nav-toggle-bar"></span>
<span class="mobile-nav-toggle-bar"></span>
</a> -->
</div>
</div>
</div>
<script type="text/javascript">
$('body').css('background', 'white');
</script>
<div class="container">
<div class="row">
<div aria-label="main navigation" class="sphinxsidebar leftsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<ul>
<li class="toctree-l1"><a class="reference internal" href="api/python/index.html">Python Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/r/index.html">R Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/julia/index.html">Julia Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/c++/index.html">C++ Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/scala/index.html">Scala Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/perl/index.html">Perl Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq/index.html">HowTo Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="architecture/index.html">System Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="community/index.html">Community</a></li>
</ul>
</div>
</div>
<div class="content">
<div class="page-tracker"></div>
<div class="section" id="mxnet-documentation">
<span id="mxnet-documentation"></span><h1>MXNet documentation<a class="headerlink" href="#mxnet-documentation" title="Permalink to this headline"></a></h1>
<div class="section" id="how-to-build-mxnet-website">
<span id="how-to-build-mxnet-website"></span><h2>How to build MXNet website<a class="headerlink" href="#how-to-build-mxnet-website" title="Permalink to this headline"></a></h2>
<p>MXNet Documentation Website is built with <a class="reference external" href="http://www.sphinx-doc.org/en/1.5.1/intro.html">sphinx 1.5.1</a>.</p>
<p>A built version of document is available at https://mxnet.incubator.apache.org</p>
<p>To build the documents locally, we need to first install <a class="reference external" href="https://docker.com">docker</a>.
Then use the following commands to clone and
build the documents.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
<span class="nb">cd</span> mxnet <span class="o">&amp;&amp;</span> make docs
</pre></div>
</div>
<p>In case docker method is not available, there is an alternate method:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>sudo pip install <span class="nv">sphinx</span><span class="o">==</span><span class="m">1</span>.5.1 <span class="nv">CommonMark</span><span class="o">==</span><span class="m">0</span>.5.4 breathe <span class="nv">mock</span><span class="o">==</span><span class="m">1</span>.0.1 recommonmark pypandoc
<span class="nb">cd</span> mxnet/docs <span class="o">&amp;&amp;</span> make html <span class="nv">USE_OPENMP</span><span class="o">=</span><span class="m">0</span>
</pre></div>
</div>
<p>The results will be available at <code class="docutils literal"><span class="pre">docs/_build/html/</span></code>.</p>
<p>Note:</p>
<ul class="simple">
<li>If C++ codes have been changed, we suggest to remove the previous results to
trigger the rebuild for all pages, namely run <code class="docutils literal"><span class="pre">make</span> <span class="pre">clean_docs</span></code>.</li>
<li>If C++ code fails to build, run <code class="docutils literal"><span class="pre">make</span> <span class="pre">clean</span></code></li>
<li>If CSS or javascript are changed, we often need to do a <em>force refresh</em> in the
browser to clear the cache.</li>
<li>If search doesn’t work, we need to <code class="docutils literal"><span class="pre">make</span> <span class="pre">clean</span></code> and rebuild.</li>
</ul>
</div>
<div class="section" id="file-structure">
<span id="file-structure"></span><h2>File structure<a class="headerlink" href="#file-structure" title="Permalink to this headline"></a></h2>
<ol class="simple">
<li>Static files such as css, javascript and html templates are under <code class="docutils literal"><span class="pre">_static</span></code> folder:</li>
</ol>
<ul class="simple">
<li>Javascript files are under <code class="docutils literal"><span class="pre">_static/js</span></code> folder.</li>
<li>Layout templates and landing page html file are under <code class="docutils literal"><span class="pre">_static/mxnet-theme</span></code> folder.</li>
<li><code class="docutils literal"><span class="pre">_static/mxnet.css</span></code> contains all MXNet website styles.</li>
</ul>
<ol class="simple">
<li>Sphinx converts markdowns files to html. Page contents are markdown files. Each content folder
contains an index file as landing page.</li>
<li>There are some utility scripts to help building website, such as <code class="docutils literal"><span class="pre">mxdoc.py</span></code> and <code class="docutils literal"><span class="pre">build_version_doc/</span></code>.
They are used to manipulate website contents during building.</li>
</ol>
</div>
<div class="section" id="production-website-building-process">
<span id="production-website-building-process"></span><h2>Production website building process<a class="headerlink" href="#production-website-building-process" title="Permalink to this headline"></a></h2>
<p><a class="reference external" href="https://builds.apache.org/job/incubator-mxnet-build-site/">Apache Jenkins MXNet website building job</a> is used to build MXNet website.
There are two ways to trigger this job.
First is nightly build for master branch.
Second is manually trigger job when a new version is released. This will build for new version.</p>
<p>The job will fetch mxnet repository, build MXNet website and push all static files to <a class="reference external" href="https://github.com/apache/incubator-mxnet-site.git">host repository</a>.
The host repo is hooked with <a class="reference external" href="https://gitbox.apache.org/repos/asf?p=incubator-mxnet-site.git;a=summary">Apache gitbox</a> to host website.</p>
</div>
<div class="section" id="build-versioning-website">
<span id="build-versioning-website"></span><h2>Build versioning website<a class="headerlink" href="#build-versioning-website" title="Permalink to this headline"></a></h2>
<p><code class="docutils literal"><span class="pre">make</span> <span class="pre">docs</span></code> doesn’t add any version information. Version information is added by <a class="reference external" href="https://builds.apache.org/job/incubator-mxnet-build-site/">Apache Jenkins MXNet website building job</a>.
Landing page will point to the latest released version. Older versions and master version are placed under versions folder.
After completing website update and testing it locally, we also need to build and test versioning website.</p>
<p>Python Beautifulsoup is the dependency:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>sudo pip install beautifulsoup4
</pre></div>
</div>
<p>The essenitial part of adding version is to use <code class="docutils literal"><span class="pre">AddPackageLink.py</span></code> to add Apache source packages and
<code class="docutils literal"><span class="pre">AddVersion.py</span></code> to update all version related information on website. These two scripts are used in <code class="docutils literal"><span class="pre">build_doc.sh</span></code> and <code class="docutils literal"><span class="pre">build_all_version</span></code>.</p>
<p><code class="docutils literal"><span class="pre">build_doc.sh</span></code> is used by Apache Jenkins MXNet webiste building job to incremental adding version. We don’t need it
for local website development.</p>
<p><code class="docutils literal"><span class="pre">build_all_version.sh</span></code> is to rebuild versioning website locally and is useful to verify versioning website locally.
We need to specify which versions to be built. This can be set in <code class="docutils literal"><span class="pre">tag_list</span></code> variable at the beginning of the script.
Version order should be from latest to oldest and placing master at the end. We may also want to modify <code class="docutils literal"><span class="pre">mxnet_url</span></code>
variable to our own repository for local testing. Another use case is to completely rebuild website with specific versions.
Although this will not happen often, we can use it to rebuld whole website and push to <a class="reference external" href="https://github.com/apache/incubator-mxnet-site.git">host repo</a>.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>./build_all_version.sh
</pre></div>
</div>
</div>
<div class="section" id="develop-notes">
<span id="develop-notes"></span><h2>Develop notes<a class="headerlink" href="#develop-notes" title="Permalink to this headline"></a></h2>
<ol class="simple">
<li><code class="docutils literal"><span class="pre">AddVersion.py</span></code> depends on Beautiful library, which requires target html files to have close tags. Although open tag html can still be rendered by browser, it will be problematic for Beautifulsoup.</li>
<li><code class="docutils literal"><span class="pre">AddVersion.py</span></code> and <code class="docutils literal"><span class="pre">AddPackageLink.py</span></code> manipulates contents for website. If there are layout changes, it may break these two scripts. We need to change scripts respectively.</li>
</ol>
</div>
</div>
</div>
</div>
<div aria-label="main navigation" class="sphinxsidebar rightsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">MXNet documentation</a><ul>
<li><a class="reference internal" href="#how-to-build-mxnet-website">How to build MXNet website</a></li>
<li><a class="reference internal" href="#file-structure">File structure</a></li>
<li><a class="reference internal" href="#production-website-building-process">Production website building process</a></li>
<li><a class="reference internal" href="#build-versioning-website">Build versioning website</a></li>
<li><a class="reference internal" href="#develop-notes">Develop notes</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div><div class="footer">
<div class="section-disclaimer">
<div class="container">
<div>
<img height="60" src="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/apache_incubator_logo.png"/>
<p>
Apache MXNet is an effort undergoing incubation at The Apache Software Foundation (ASF), <strong>sponsored by the <i>Apache Incubator</i></strong>. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
</p>
<p>
"Copyright © 2017-2018, The Apache Software Foundation
Apache MXNet, MXNet, Apache, the Apache feather, and the Apache MXNet project logo are either registered trademarks or trademarks of the Apache Software Foundation."
</p>
</div>
</div>
</div>
</div> <!-- pagename != index -->
</div>
<script crossorigin="anonymous" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="_static/js/sidebar.js" type="text/javascript"></script>
<script src="_static/js/search.js" type="text/javascript"></script>
<script src="_static/js/navbar.js" type="text/javascript"></script>
<script src="_static/js/clipboard.min.js" type="text/javascript"></script>
<script src="_static/js/copycode.js" type="text/javascript"></script>
<script src="_static/js/page.js" type="text/javascript"></script>
<script type="text/javascript">
$('body').ready(function () {
$('body').css('visibility', 'visible');
});
</script>
</body>
</html>