blob: c06a8d500f3bd3fb0cecf1bd2cf4fe9dd9d9f6a8 [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>Symbol API — 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: ''
};
</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://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> -->
<!-- -->
<link href="../index.html" rel="up" title="MXNet - Python API">
<link href="random.html" rel="next" title="Random Distribution Generator Symbol API"/>
<link href="../ndarray/contrib.html" rel="prev" title="Contrib NDArray API"/>
<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=https://mxnet.incubator.apache.org/>1.1.0</a></li><li><a class="main-nav-link" href=https://mxnet.incubator.apache.org/versions/1.0.0/index.html>1.0.0</a></li><li><a class="main-nav-link" href=https://mxnet.incubator.apache.org/versions/0.12.1/index.html>0.12.1</a></li><li><a class="main-nav-link" href=https://mxnet.incubator.apache.org/versions/0.12.0/index.html>0.12.0</a></li><li><a class="main-nav-link" href=https://mxnet.incubator.apache.org/versions/0.11.0/index.html>0.11.0</a></li><li><a class="main-nav-link" href=https://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=https://mxnet.incubator.apache.org/>1.1.0</a></li><li><a tabindex="-1" href=https://mxnet.incubator.apache.org/versions/1.0.0/index.html>1.0.0</a></li><li><a tabindex="-1" href=https://mxnet.incubator.apache.org/versions/0.12.1/index.html>0.12.1</a></li><li><a tabindex="-1" href=https://mxnet.incubator.apache.org/versions/0.12.0/index.html>0.12.0</a></li><li><a tabindex="-1" href=https://mxnet.incubator.apache.org/versions/0.11.0/index.html>0.11.0</a></li><li><a tabindex="-1" href=https://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 class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Python Documents</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../index.html#ndarray-api">NDArray API</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html#symbol-api">Symbol API</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="">Symbol API</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#overview">Overview</a></li>
<li class="toctree-l4"><a class="reference internal" href="#the-symbol-class">The <code class="docutils literal"><span class="pre">Symbol</span></code> class</a></li>
<li class="toctree-l4"><a class="reference internal" href="#basic-neural-network-functions">Basic neural network functions</a></li>
<li class="toctree-l4"><a class="reference internal" href="#symbol-creation-routines">Symbol creation routines</a></li>
<li class="toctree-l4"><a class="reference internal" href="#symbol-manipulation-routines">Symbol manipulation routines</a></li>
<li class="toctree-l4"><a class="reference internal" href="#mathematical-functions">Mathematical functions</a></li>
<li class="toctree-l4"><a class="reference internal" href="#neural-network">Neural network</a></li>
<li class="toctree-l4"><a class="reference internal" href="#api-reference">API Reference</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="random.html">Random Distribution Generator Symbol API</a></li>
<li class="toctree-l3"><a class="reference internal" href="linalg.html">Linear Algebra Symbol API</a></li>
<li class="toctree-l3"><a class="reference internal" href="sparse.html">Sparse Symbol API</a></li>
<li class="toctree-l3"><a class="reference internal" href="contrib.html">Contrib Symbol API</a></li>
<li class="toctree-l3"><a class="reference internal" href="rnn.html">RNN Cell Symbol API</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#module-api">Module API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#autograd-api">Autograd API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#gluon-api">Gluon API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#kvstore-api">KVStore API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#io-api">IO API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#image-api">Image API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#optimization-api">Optimization API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#callback-api">Callback API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#metric-api">Metric API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#run-time-compilation-api">Run-Time Compilation API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#contrib-package">Contrib Package</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../r/index.html">R Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../julia/index.html">Julia Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../c++/index.html">C++ Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../scala/index.html">Scala Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../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="symbol-api">
<span id="symbol-api"></span><h1>Symbol API<a class="headerlink" href="#symbol-api" title="Permalink to this headline"></a></h1>
<div class="section" id="overview">
<span id="overview"></span><h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline"></a></h2>
<p>This document lists the routines of the symbolic expression package:</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#module-mxnet.symbol" title="mxnet.symbol"><code class="xref py py-obj docutils literal"><span class="pre">mxnet.symbol</span></code></a></td>
<td>Symbol API of MXNet.</td>
</tr>
</tbody>
</table>
<p>The <code class="docutils literal"><span class="pre">Symbol</span></code> API, defined in the <code class="docutils literal"><span class="pre">symbol</span></code> (or simply <code class="docutils literal"><span class="pre">sym</span></code>) package, provides
neural network graphs and auto-differentiation.
A symbol represents a multi-output symbolic expression.
They are composited by operators, such as simple matrix operations (e.g. “+”),
or a neural network layer (e.g. convolution layer).
An operator can take several input variables,
produce more than one output variables, and have internal state variables.
A variable can be either free, which we can bind with value later,
or an output of another symbol.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="nb">type</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
<span class="go"><class 'mxnet.symbol.Symbol'></span>
<span class="gp">>>> </span><span class="n">e</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">bind</span><span class="p">(</span><span class="n">mx</span><span class="o">.</span><span class="n">cpu</span><span class="p">(),</span> <span class="p">{</span><span class="s1">'a'</span><span class="p">:</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">]),</span> <span class="s1">'b'</span><span class="p">:</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">])})</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">e</span><span class="o">.</span><span class="n">forward</span><span class="p">()</span>
<span class="gp">>>> </span><span class="n">y</span>
<span class="go">[<NDArray 2 @cpu(0)>]</span>
<span class="gp">>>> </span><span class="n">y</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([ 4., 7.], dtype=float32)</span>
</pre></div>
</div>
<p>A detailed tutorial is available at <a class="reference external" href="https://mxnet.incubator.apache.org/tutorials/basic/symbol.html">Symbol - Neural network graphs and auto-differentiation</a>.
<br/><br/></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>most operators provided in <code class="docutils literal"><span class="pre">symbol</span></code> are similar to those in <code class="docutils literal"><span class="pre">ndarray</span></code>
although there are few differences:</p>
<ul class="last simple">
<li><code class="docutils literal"><span class="pre">symbol</span></code> adopts declarative programming. In other words, we need to first
compose the computations, and then feed it with data for execution whereas
ndarray adopts imperative programming.</li>
<li>Most binary operators in <code class="docutils literal"><span class="pre">symbol</span></code> such as <code class="docutils literal"><span class="pre">+</span></code> and <code class="docutils literal"><span class="pre">></span></code> don’t broadcast.
We need to call the broadcast version of the operator such as <code class="docutils literal"><span class="pre">broadcast_plus</span></code>
explicitly.</li>
</ul>
</div>
<p>In the rest of this document, we first overview the methods provided by the
<code class="docutils literal"><span class="pre">symbol.Symbol</span></code> class, and then list other routines provided by the
<code class="docutils literal"><span class="pre">symbol</span></code> package.</p>
</div>
<div class="section" id="the-symbol-class">
<span id="the-symbol-class"></span><h2>The <code class="docutils literal"><span class="pre">Symbol</span></code> class<a class="headerlink" href="#the-symbol-class" title="Permalink to this headline"></a></h2>
<div class="section" id="composition">
<span id="composition"></span><h3>Composition<a class="headerlink" href="#composition" title="Permalink to this headline"></a></h3>
<p>Composite multiple symbols into a new one by an operator.</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__call__" title="mxnet.symbol.Symbol.__call__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__call__</span></code></a></td>
<td>Composes symbol using inputs.</td>
</tr>
</tbody>
</table>
<div class="section" id="arithmetic-operations">
<span id="arithmetic-operations"></span><h4>Arithmetic operations<a class="headerlink" href="#arithmetic-operations" title="Permalink to this headline"></a></h4>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__add__" title="mxnet.symbol.Symbol.__add__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__add__</span></code></a></td>
<td>x.__add__(y) <=> x+y</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__sub__" title="mxnet.symbol.Symbol.__sub__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__sub__</span></code></a></td>
<td>x.__sub__(y) <=> x-y</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__rsub__" title="mxnet.symbol.Symbol.__rsub__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__rsub__</span></code></a></td>
<td>x.__rsub__(y) <=> y-x</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__neg__" title="mxnet.symbol.Symbol.__neg__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__neg__</span></code></a></td>
<td>x.__neg__() <=> -x</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__mul__" title="mxnet.symbol.Symbol.__mul__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__mul__</span></code></a></td>
<td>x.__mul__(y) <=> x*y</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__div__" title="mxnet.symbol.Symbol.__div__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__div__</span></code></a></td>
<td>x.__div__(y) <=> x/y</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__rdiv__" title="mxnet.symbol.Symbol.__rdiv__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__rdiv__</span></code></a></td>
<td>x.__rdiv__(y) <=> y/x</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__mod__" title="mxnet.symbol.Symbol.__mod__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__mod__</span></code></a></td>
<td>x.__mod__(y) <=> x%y</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__rmod__" title="mxnet.symbol.Symbol.__rmod__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__rmod__</span></code></a></td>
<td>x.__rmod__(y) <=> y%x</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__pow__" title="mxnet.symbol.Symbol.__pow__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__pow__</span></code></a></td>
<td>x.__pow__(y) <=> x**y</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="trigonometric-functions">
<span id="trigonometric-functions"></span><h4>Trigonometric functions<a class="headerlink" href="#trigonometric-functions" title="Permalink to this headline"></a></h4>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.sin" title="mxnet.symbol.Symbol.sin"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.sin</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sin" title="mxnet.symbol.sin"><code class="xref py py-func docutils literal"><span class="pre">sin()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.cos" title="mxnet.symbol.Symbol.cos"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.cos</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.cos" title="mxnet.symbol.cos"><code class="xref py py-func docutils literal"><span class="pre">cos()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.tan" title="mxnet.symbol.Symbol.tan"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.tan</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.tan" title="mxnet.symbol.tan"><code class="xref py py-func docutils literal"><span class="pre">tan()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.arcsin" title="mxnet.symbol.Symbol.arcsin"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.arcsin</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arcsin" title="mxnet.symbol.arcsin"><code class="xref py py-func docutils literal"><span class="pre">arcsin()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.arccos" title="mxnet.symbol.Symbol.arccos"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.arccos</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arccos" title="mxnet.symbol.arccos"><code class="xref py py-func docutils literal"><span class="pre">arccos()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.arctan" title="mxnet.symbol.Symbol.arctan"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.arctan</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arctan" title="mxnet.symbol.arctan"><code class="xref py py-func docutils literal"><span class="pre">arctan()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.degrees" title="mxnet.symbol.Symbol.degrees"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.degrees</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.degrees" title="mxnet.symbol.degrees"><code class="xref py py-func docutils literal"><span class="pre">degrees()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.radians" title="mxnet.symbol.Symbol.radians"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.radians</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.radians" title="mxnet.symbol.radians"><code class="xref py py-func docutils literal"><span class="pre">radians()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="hyperbolic-functions">
<span id="hyperbolic-functions"></span><h4>Hyperbolic functions<a class="headerlink" href="#hyperbolic-functions" title="Permalink to this headline"></a></h4>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.sinh" title="mxnet.symbol.Symbol.sinh"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.sinh</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sinh" title="mxnet.symbol.sinh"><code class="xref py py-func docutils literal"><span class="pre">sinh()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.cosh" title="mxnet.symbol.Symbol.cosh"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.cosh</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.cosh" title="mxnet.symbol.cosh"><code class="xref py py-func docutils literal"><span class="pre">cosh()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.tanh" title="mxnet.symbol.Symbol.tanh"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.tanh</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.tanh" title="mxnet.symbol.tanh"><code class="xref py py-func docutils literal"><span class="pre">tanh()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.arcsinh" title="mxnet.symbol.Symbol.arcsinh"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.arcsinh</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arcsinh" title="mxnet.symbol.arcsinh"><code class="xref py py-func docutils literal"><span class="pre">arcsinh()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.arccosh" title="mxnet.symbol.Symbol.arccosh"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.arccosh</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arccosh" title="mxnet.symbol.arccosh"><code class="xref py py-func docutils literal"><span class="pre">arccosh()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.arctanh" title="mxnet.symbol.Symbol.arctanh"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.arctanh</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arctanh" title="mxnet.symbol.arctanh"><code class="xref py py-func docutils literal"><span class="pre">arctanh()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="exponents-and-logarithms">
<span id="exponents-and-logarithms"></span><h4>Exponents and logarithms<a class="headerlink" href="#exponents-and-logarithms" title="Permalink to this headline"></a></h4>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.exp" title="mxnet.symbol.Symbol.exp"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.exp</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.exp" title="mxnet.symbol.exp"><code class="xref py py-func docutils literal"><span class="pre">exp()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.expm1" title="mxnet.symbol.Symbol.expm1"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.expm1</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.expm1" title="mxnet.symbol.expm1"><code class="xref py py-func docutils literal"><span class="pre">expm1()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.log" title="mxnet.symbol.Symbol.log"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.log</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.log" title="mxnet.symbol.log"><code class="xref py py-func docutils literal"><span class="pre">log()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.log10" title="mxnet.symbol.Symbol.log10"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.log10</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.log10" title="mxnet.symbol.log10"><code class="xref py py-func docutils literal"><span class="pre">log10()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.log2" title="mxnet.symbol.Symbol.log2"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.log2</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.log2" title="mxnet.symbol.log2"><code class="xref py py-func docutils literal"><span class="pre">log2()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.log1p" title="mxnet.symbol.Symbol.log1p"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.log1p</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.log1p" title="mxnet.symbol.log1p"><code class="xref py py-func docutils literal"><span class="pre">log1p()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="powers">
<span id="powers"></span><h4>Powers<a class="headerlink" href="#powers" title="Permalink to this headline"></a></h4>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.sqrt" title="mxnet.symbol.Symbol.sqrt"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.sqrt</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sqrt" title="mxnet.symbol.sqrt"><code class="xref py py-func docutils literal"><span class="pre">sqrt()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.rsqrt" title="mxnet.symbol.Symbol.rsqrt"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.rsqrt</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.rsqrt" title="mxnet.symbol.rsqrt"><code class="xref py py-func docutils literal"><span class="pre">rsqrt()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.cbrt" title="mxnet.symbol.Symbol.cbrt"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.cbrt</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.cbrt" title="mxnet.symbol.cbrt"><code class="xref py py-func docutils literal"><span class="pre">cbrt()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.rcbrt" title="mxnet.symbol.Symbol.rcbrt"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.rcbrt</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.rcbrt" title="mxnet.symbol.rcbrt"><code class="xref py py-func docutils literal"><span class="pre">rcbrt()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.square" title="mxnet.symbol.Symbol.square"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.square</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.square" title="mxnet.symbol.square"><code class="xref py py-func docutils literal"><span class="pre">square()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="basic-neural-network-functions">
<span id="basic-neural-network-functions"></span><h2>Basic neural network functions<a class="headerlink" href="#basic-neural-network-functions" title="Permalink to this headline"></a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.relu" title="mxnet.symbol.Symbol.relu"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.relu</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.relu" title="mxnet.symbol.relu"><code class="xref py py-func docutils literal"><span class="pre">relu()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.sigmoid" title="mxnet.symbol.Symbol.sigmoid"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.sigmoid</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sigmoid" title="mxnet.symbol.sigmoid"><code class="xref py py-func docutils literal"><span class="pre">sigmoid()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.softmax" title="mxnet.symbol.Symbol.softmax"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.softmax</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.softmax" title="mxnet.symbol.softmax"><code class="xref py py-func docutils literal"><span class="pre">softmax()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.log_softmax" title="mxnet.symbol.Symbol.log_softmax"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.log_softmax</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.log_softmax" title="mxnet.symbol.log_softmax"><code class="xref py py-func docutils literal"><span class="pre">log_softmax()</span></code></a>.</td>
</tr>
</tbody>
</table>
<div class="section" id="comparison-operators">
<span id="comparison-operators"></span><h3>Comparison operators<a class="headerlink" href="#comparison-operators" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__lt__" title="mxnet.symbol.Symbol.__lt__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__lt__</span></code></a></td>
<td>x.__lt__(y) <=> x<y</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__le__" title="mxnet.symbol.Symbol.__le__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__le__</span></code></a></td>
<td>x.__le__(y) <=> x<=y</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__gt__" title="mxnet.symbol.Symbol.__gt__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__gt__</span></code></a></td>
<td>x.__gt__(y) <=> x>y</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__ge__" title="mxnet.symbol.Symbol.__ge__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__ge__</span></code></a></td>
<td>x.__ge__(y) <=> x>=y</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__eq__" title="mxnet.symbol.Symbol.__eq__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__eq__</span></code></a></td>
<td>x.__eq__(y) <=> x==y</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__ne__" title="mxnet.symbol.Symbol.__ne__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__ne__</span></code></a></td>
<td>x.__ne__(y) <=> x!=y</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="symbol-creation">
<span id="symbol-creation"></span><h3>Symbol creation<a class="headerlink" href="#symbol-creation" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.zeros_like" title="mxnet.symbol.Symbol.zeros_like"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.zeros_like</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.zeros_like" title="mxnet.symbol.zeros_like"><code class="xref py py-func docutils literal"><span class="pre">zeros_like()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.ones_like" title="mxnet.symbol.Symbol.ones_like"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.ones_like</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.ones_like" title="mxnet.symbol.ones_like"><code class="xref py py-func docutils literal"><span class="pre">ones_like()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="changing-shape-and-type">
<span id="changing-shape-and-type"></span><h3>Changing shape and type<a class="headerlink" href="#changing-shape-and-type" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.astype" title="mxnet.symbol.Symbol.astype"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.astype</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.cast" title="mxnet.symbol.cast"><code class="xref py py-func docutils literal"><span class="pre">cast()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.reshape" title="mxnet.symbol.Symbol.reshape"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.reshape</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.reshape" title="mxnet.symbol.reshape"><code class="xref py py-func docutils literal"><span class="pre">reshape()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.reshape_like" title="mxnet.symbol.Symbol.reshape_like"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.reshape_like</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.reshape_like" title="mxnet.symbol.reshape_like"><code class="xref py py-func docutils literal"><span class="pre">reshape_like()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.flatten" title="mxnet.symbol.Symbol.flatten"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.flatten</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.flatten" title="mxnet.symbol.flatten"><code class="xref py py-func docutils literal"><span class="pre">flatten()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.expand_dims" title="mxnet.symbol.Symbol.expand_dims"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.expand_dims</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.expand_dims" title="mxnet.symbol.expand_dims"><code class="xref py py-func docutils literal"><span class="pre">expand_dims()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="expanding-elements">
<span id="expanding-elements"></span><h3>Expanding elements<a class="headerlink" href="#expanding-elements" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.broadcast_to" title="mxnet.symbol.Symbol.broadcast_to"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.broadcast_to</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.broadcast_to" title="mxnet.symbol.broadcast_to"><code class="xref py py-func docutils literal"><span class="pre">broadcast_to()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.broadcast_axes" title="mxnet.symbol.Symbol.broadcast_axes"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.broadcast_axes</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.broadcast_axes" title="mxnet.symbol.broadcast_axes"><code class="xref py py-func docutils literal"><span class="pre">broadcast_axes()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.tile" title="mxnet.symbol.Symbol.tile"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.tile</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.tile" title="mxnet.symbol.tile"><code class="xref py py-func docutils literal"><span class="pre">tile()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.pad" title="mxnet.symbol.Symbol.pad"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.pad</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.pad" title="mxnet.symbol.pad"><code class="xref py py-func docutils literal"><span class="pre">pad()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="rearranging-elements">
<span id="rearranging-elements"></span><h3>Rearranging elements<a class="headerlink" href="#rearranging-elements" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.transpose" title="mxnet.symbol.Symbol.transpose"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.transpose</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.transpose" title="mxnet.symbol.transpose"><code class="xref py py-func docutils literal"><span class="pre">transpose()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.swapaxes" title="mxnet.symbol.Symbol.swapaxes"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.swapaxes</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.swapaxes" title="mxnet.symbol.swapaxes"><code class="xref py py-func docutils literal"><span class="pre">swapaxes()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.flip" title="mxnet.symbol.Symbol.flip"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.flip</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.flip" title="mxnet.symbol.flip"><code class="xref py py-func docutils literal"><span class="pre">flip()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="reduce-functions">
<span id="reduce-functions"></span><h3>Reduce functions<a class="headerlink" href="#reduce-functions" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.sum" title="mxnet.symbol.Symbol.sum"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.sum</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sum" title="mxnet.symbol.sum"><code class="xref py py-func docutils literal"><span class="pre">sum()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.nansum" title="mxnet.symbol.Symbol.nansum"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.nansum</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.nansum" title="mxnet.symbol.nansum"><code class="xref py py-func docutils literal"><span class="pre">nansum()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.prod" title="mxnet.symbol.Symbol.prod"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.prod</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.prod" title="mxnet.symbol.prod"><code class="xref py py-func docutils literal"><span class="pre">prod()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.nanprod" title="mxnet.symbol.Symbol.nanprod"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.nanprod</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.nanprod" title="mxnet.symbol.nanprod"><code class="xref py py-func docutils literal"><span class="pre">nanprod()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.mean" title="mxnet.symbol.Symbol.mean"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.mean</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.mean" title="mxnet.symbol.mean"><code class="xref py py-func docutils literal"><span class="pre">mean()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.max" title="mxnet.symbol.Symbol.max"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.max</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.max" title="mxnet.symbol.max"><code class="xref py py-func docutils literal"><span class="pre">max()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.min" title="mxnet.symbol.Symbol.min"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.min</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.min" title="mxnet.symbol.min"><code class="xref py py-func docutils literal"><span class="pre">min()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.norm" title="mxnet.symbol.Symbol.norm"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.norm</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.norm" title="mxnet.symbol.norm"><code class="xref py py-func docutils literal"><span class="pre">norm()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="rounding">
<span id="rounding"></span><h3>Rounding<a class="headerlink" href="#rounding" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.round" title="mxnet.symbol.Symbol.round"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.round</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.round" title="mxnet.symbol.round"><code class="xref py py-func docutils literal"><span class="pre">round()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.rint" title="mxnet.symbol.Symbol.rint"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.rint</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.rint" title="mxnet.symbol.rint"><code class="xref py py-func docutils literal"><span class="pre">rint()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.fix" title="mxnet.symbol.Symbol.fix"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.fix</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.fix" title="mxnet.symbol.fix"><code class="xref py py-func docutils literal"><span class="pre">fix()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.floor" title="mxnet.symbol.Symbol.floor"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.floor</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.floor" title="mxnet.symbol.floor"><code class="xref py py-func docutils literal"><span class="pre">floor()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.ceil" title="mxnet.symbol.Symbol.ceil"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.ceil</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.ceil" title="mxnet.symbol.ceil"><code class="xref py py-func docutils literal"><span class="pre">ceil()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.trunc" title="mxnet.symbol.Symbol.trunc"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.trunc</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.trunc" title="mxnet.symbol.trunc"><code class="xref py py-func docutils literal"><span class="pre">trunc()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="sorting-and-searching">
<span id="sorting-and-searching"></span><h3>Sorting and searching<a class="headerlink" href="#sorting-and-searching" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.sort" title="mxnet.symbol.Symbol.sort"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.sort</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sort" title="mxnet.symbol.sort"><code class="xref py py-func docutils literal"><span class="pre">sort()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.argsort" title="mxnet.symbol.Symbol.argsort"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.argsort</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.argsort" title="mxnet.symbol.argsort"><code class="xref py py-func docutils literal"><span class="pre">argsort()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.topk" title="mxnet.symbol.Symbol.topk"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.topk</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.topk" title="mxnet.symbol.topk"><code class="xref py py-func docutils literal"><span class="pre">topk()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.argmax" title="mxnet.symbol.Symbol.argmax"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.argmax</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.argmax" title="mxnet.symbol.argmax"><code class="xref py py-func docutils literal"><span class="pre">argmax()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.argmin" title="mxnet.symbol.Symbol.argmin"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.argmin</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.argmin" title="mxnet.symbol.argmin"><code class="xref py py-func docutils literal"><span class="pre">argmin()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.argmax_channel" title="mxnet.symbol.Symbol.argmax_channel"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.argmax_channel</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.argmax_channel" title="mxnet.symbol.argmax_channel"><code class="xref py py-func docutils literal"><span class="pre">argmax_channel()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="query-information">
<span id="query-information"></span><h3>Query information<a class="headerlink" href="#query-information" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.name" title="mxnet.symbol.Symbol.name"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.name</span></code></a></td>
<td>Gets name string from the symbol, this function only works for non-grouped symbol.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.list_arguments" title="mxnet.symbol.Symbol.list_arguments"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.list_arguments</span></code></a></td>
<td>Lists all the arguments in the symbol.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.list_outputs" title="mxnet.symbol.Symbol.list_outputs"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.list_outputs</span></code></a></td>
<td>Lists all the outputs in the symbol.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.list_auxiliary_states" title="mxnet.symbol.Symbol.list_auxiliary_states"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.list_auxiliary_states</span></code></a></td>
<td>Lists all the auxiliary states in the symbol.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.list_attr" title="mxnet.symbol.Symbol.list_attr"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.list_attr</span></code></a></td>
<td>Gets all attributes from the symbol.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.attr" title="mxnet.symbol.Symbol.attr"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.attr</span></code></a></td>
<td>Returns the attribute string for corresponding input key from the symbol.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.attr_dict" title="mxnet.symbol.Symbol.attr_dict"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.attr_dict</span></code></a></td>
<td>Recursively gets all attributes from the symbol and its children.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="indexing">
<span id="indexing"></span><h3>Indexing<a class="headerlink" href="#indexing" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.slice" title="mxnet.symbol.Symbol.slice"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.slice</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.slice" title="mxnet.symbol.slice"><code class="xref py py-func docutils literal"><span class="pre">slice()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.slice_axis" title="mxnet.symbol.Symbol.slice_axis"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.slice_axis</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.slice_axis" title="mxnet.symbol.slice_axis"><code class="xref py py-func docutils literal"><span class="pre">slice_axis()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.take" title="mxnet.symbol.Symbol.take"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.take</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.take" title="mxnet.symbol.take"><code class="xref py py-func docutils literal"><span class="pre">take()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.one_hot" title="mxnet.symbol.Symbol.one_hot"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.one_hot</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.one_hot" title="mxnet.symbol.one_hot"><code class="xref py py-func docutils literal"><span class="pre">one_hot()</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.pick" title="mxnet.symbol.Symbol.pick"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.pick</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.pick" title="mxnet.symbol.pick"><code class="xref py py-func docutils literal"><span class="pre">pick()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="get-internal-and-output-symbol">
<span id="get-internal-and-output-symbol"></span><h3>Get internal and output symbol<a class="headerlink" href="#get-internal-and-output-symbol" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__getitem__" title="mxnet.symbol.Symbol.__getitem__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__getitem__</span></code></a></td>
<td>x.__getitem__(i) <=> x[i]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.__iter__" title="mxnet.symbol.Symbol.__iter__"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.__iter__</span></code></a></td>
<td>Returns a generator object of symbol.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.get_internals" title="mxnet.symbol.Symbol.get_internals"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.get_internals</span></code></a></td>
<td>Gets a new grouped symbol <cite>sgroup</cite>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.get_children" title="mxnet.symbol.Symbol.get_children"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.get_children</span></code></a></td>
<td>Gets a new grouped symbol whose output contains inputs to output nodes of the original symbol.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="inference-type-and-shape">
<span id="inference-type-and-shape"></span><h3>Inference type and shape<a class="headerlink" href="#inference-type-and-shape" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.infer_type" title="mxnet.symbol.Symbol.infer_type"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.infer_type</span></code></a></td>
<td>Infers the type of all arguments and all outputs, given the known types for some arguments.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.infer_shape" title="mxnet.symbol.Symbol.infer_shape"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.infer_shape</span></code></a></td>
<td>Infers the shapes of all arguments and all outputs given the known shapes of some arguments.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.infer_shape_partial" title="mxnet.symbol.Symbol.infer_shape_partial"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.infer_shape_partial</span></code></a></td>
<td>Infers the shape partially.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="bind">
<span id="bind"></span><h3>Bind<a class="headerlink" href="#bind" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.bind" title="mxnet.symbol.Symbol.bind"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.bind</span></code></a></td>
<td>Binds the current symbol to an executor and returns it.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.simple_bind" title="mxnet.symbol.Symbol.simple_bind"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.simple_bind</span></code></a></td>
<td>Bind current symbol to get an executor, allocate all the arguments needed.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="save">
<span id="save"></span><h3>Save<a class="headerlink" href="#save" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.save" title="mxnet.symbol.Symbol.save"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.save</span></code></a></td>
<td>Saves symbol to a file.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.tojson" title="mxnet.symbol.Symbol.tojson"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.tojson</span></code></a></td>
<td>Saves symbol to a JSON string.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.debug_str" title="mxnet.symbol.Symbol.debug_str"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.debug_str</span></code></a></td>
<td>Gets a debug string of symbol.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="miscellaneous">
<span id="miscellaneous"></span><h3>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Symbol.clip" title="mxnet.symbol.Symbol.clip"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.clip</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.clip" title="mxnet.symbol.clip"><code class="xref py py-func docutils literal"><span class="pre">clip()</span></code></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Symbol.sign" title="mxnet.symbol.Symbol.sign"><code class="xref py py-obj docutils literal"><span class="pre">Symbol.sign</span></code></a></td>
<td>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sign" title="mxnet.symbol.sign"><code class="xref py py-func docutils literal"><span class="pre">sign()</span></code></a>.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="symbol-creation-routines">
<span id="symbol-creation-routines"></span><h2>Symbol creation routines<a class="headerlink" href="#symbol-creation-routines" title="Permalink to this headline"></a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.var" title="mxnet.symbol.var"><code class="xref py py-obj docutils literal"><span class="pre">var</span></code></a></td>
<td>Creates a symbolic variable with specified name.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.zeros" title="mxnet.symbol.zeros"><code class="xref py py-obj docutils literal"><span class="pre">zeros</span></code></a></td>
<td>Returns a new symbol of given shape and type, filled with zeros.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.zeros_like" title="mxnet.symbol.zeros_like"><code class="xref py py-obj docutils literal"><span class="pre">zeros_like</span></code></a></td>
<td>Return an array of zeros with the same shape and type as the input array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.ones" title="mxnet.symbol.ones"><code class="xref py py-obj docutils literal"><span class="pre">ones</span></code></a></td>
<td>Returns a new symbol of given shape and type, filled with ones.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.ones_like" title="mxnet.symbol.ones_like"><code class="xref py py-obj docutils literal"><span class="pre">ones_like</span></code></a></td>
<td>Return an array of ones with the same shape and type as the input array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.arange" title="mxnet.symbol.arange"><code class="xref py py-obj docutils literal"><span class="pre">arange</span></code></a></td>
<td>Returns evenly spaced values within a given interval.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="symbol-manipulation-routines">
<span id="symbol-manipulation-routines"></span><h2>Symbol manipulation routines<a class="headerlink" href="#symbol-manipulation-routines" title="Permalink to this headline"></a></h2>
<div class="section" id="changing-shape-and-type">
<span id="id1"></span><h3>Changing shape and type<a class="headerlink" href="#changing-shape-and-type" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.cast" title="mxnet.symbol.cast"><code class="xref py py-obj docutils literal"><span class="pre">cast</span></code></a></td>
<td>Casts all elements of the input to a new type.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.reshape" title="mxnet.symbol.reshape"><code class="xref py py-obj docutils literal"><span class="pre">reshape</span></code></a></td>
<td>Reshapes the input array.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.reshape_like" title="mxnet.symbol.reshape_like"><code class="xref py py-obj docutils literal"><span class="pre">reshape_like</span></code></a></td>
<td>Reshape lhs to have the same shape as rhs.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.flatten" title="mxnet.symbol.flatten"><code class="xref py py-obj docutils literal"><span class="pre">flatten</span></code></a></td>
<td>Flattens the input array into a 2-D array by collapsing the higher dimensions.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.expand_dims" title="mxnet.symbol.expand_dims"><code class="xref py py-obj docutils literal"><span class="pre">expand_dims</span></code></a></td>
<td>Inserts a new axis of size 1 into the array shape</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="expanding-elements">
<span id="id2"></span><h3>Expanding elements<a class="headerlink" href="#expanding-elements" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.broadcast_to" title="mxnet.symbol.broadcast_to"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_to</span></code></a></td>
<td>Broadcasts the input array to a new shape.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.broadcast_axes" title="mxnet.symbol.broadcast_axes"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_axes</span></code></a></td>
<td>Broadcasts the input array over particular axes.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.repeat" title="mxnet.symbol.repeat"><code class="xref py py-obj docutils literal"><span class="pre">repeat</span></code></a></td>
<td>Repeats elements of an array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.tile" title="mxnet.symbol.tile"><code class="xref py py-obj docutils literal"><span class="pre">tile</span></code></a></td>
<td>Repeats the whole array multiple times.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.pad" title="mxnet.symbol.pad"><code class="xref py py-obj docutils literal"><span class="pre">pad</span></code></a></td>
<td>Pads an input array with a constant or edge values of the array.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="rearranging-elements">
<span id="id3"></span><h3>Rearranging elements<a class="headerlink" href="#rearranging-elements" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.transpose" title="mxnet.symbol.transpose"><code class="xref py py-obj docutils literal"><span class="pre">transpose</span></code></a></td>
<td>Permutes the dimensions of an array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.swapaxes" title="mxnet.symbol.swapaxes"><code class="xref py py-obj docutils literal"><span class="pre">swapaxes</span></code></a></td>
<td>Interchanges two axes of an array.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.flip" title="mxnet.symbol.flip"><code class="xref py py-obj docutils literal"><span class="pre">flip</span></code></a></td>
<td>Reverses the order of elements along given axis while preserving array shape.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="joining-and-splitting-symbols">
<span id="joining-and-splitting-symbols"></span><h3>Joining and splitting symbols<a class="headerlink" href="#joining-and-splitting-symbols" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.concat" title="mxnet.symbol.concat"><code class="xref py py-obj docutils literal"><span class="pre">concat</span></code></a></td>
<td>Joins input arrays along a given axis.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.split" title="mxnet.symbol.split"><code class="xref py py-obj docutils literal"><span class="pre">split</span></code></a></td>
<td>Splits an array along a particular axis into multiple sub-arrays.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.stack" title="mxnet.symbol.stack"><code class="xref py py-obj docutils literal"><span class="pre">stack</span></code></a></td>
<td>Join a sequence of arrays along a new axis.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="indexing-routines">
<span id="indexing-routines"></span><h3>Indexing routines<a class="headerlink" href="#indexing-routines" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.slice" title="mxnet.symbol.slice"><code class="xref py py-obj docutils literal"><span class="pre">slice</span></code></a></td>
<td>Slices a region of the array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.slice_axis" title="mxnet.symbol.slice_axis"><code class="xref py py-obj docutils literal"><span class="pre">slice_axis</span></code></a></td>
<td>Slices along a given axis.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.take" title="mxnet.symbol.take"><code class="xref py py-obj docutils literal"><span class="pre">take</span></code></a></td>
<td>Takes elements from an input array along the given axis.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.batch_take" title="mxnet.symbol.batch_take"><code class="xref py py-obj docutils literal"><span class="pre">batch_take</span></code></a></td>
<td>Takes elements from a data batch.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.one_hot" title="mxnet.symbol.one_hot"><code class="xref py py-obj docutils literal"><span class="pre">one_hot</span></code></a></td>
<td>Returns a one-hot array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.pick" title="mxnet.symbol.pick"><code class="xref py py-obj docutils literal"><span class="pre">pick</span></code></a></td>
<td>Picks elements from an input array according to the input indices along the given axis.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.where" title="mxnet.symbol.where"><code class="xref py py-obj docutils literal"><span class="pre">where</span></code></a></td>
<td>Return the elements, either from x or y, depending on the condition.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.gather_nd" title="mxnet.symbol.gather_nd"><code class="xref py py-obj docutils literal"><span class="pre">gather_nd</span></code></a></td>
<td>Gather elements or slices from <cite>data</cite> and store to a tensor whose shape is defined by <cite>indices</cite>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.scatter_nd" title="mxnet.symbol.scatter_nd"><code class="xref py py-obj docutils literal"><span class="pre">scatter_nd</span></code></a></td>
<td>Scatters data into a new tensor according to indices.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mathematical-functions">
<span id="mathematical-functions"></span><h2>Mathematical functions<a class="headerlink" href="#mathematical-functions" title="Permalink to this headline"></a></h2>
<div class="section" id="arithmetic-operations">
<span id="id4"></span><h3>Arithmetic operations<a class="headerlink" href="#arithmetic-operations" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.broadcast_add" title="mxnet.symbol.broadcast_add"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_add</span></code></a></td>
<td>Returns element-wise sum of the input arrays with broadcasting.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.broadcast_sub" title="mxnet.symbol.broadcast_sub"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_sub</span></code></a></td>
<td>Returns element-wise difference of the input arrays with broadcasting.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.broadcast_mul" title="mxnet.symbol.broadcast_mul"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_mul</span></code></a></td>
<td>Returns element-wise product of the input arrays with broadcasting.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.broadcast_div" title="mxnet.symbol.broadcast_div"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_div</span></code></a></td>
<td>Returns element-wise division of the input arrays with broadcasting.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.broadcast_mod" title="mxnet.symbol.broadcast_mod"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_mod</span></code></a></td>
<td>Returns element-wise modulo of the input arrays with broadcasting.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.negative" title="mxnet.symbol.negative"><code class="xref py py-obj docutils literal"><span class="pre">negative</span></code></a></td>
<td>Numerical negative of the argument, element-wise.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.dot" title="mxnet.symbol.dot"><code class="xref py py-obj docutils literal"><span class="pre">dot</span></code></a></td>
<td>Dot product of two arrays.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.batch_dot" title="mxnet.symbol.batch_dot"><code class="xref py py-obj docutils literal"><span class="pre">batch_dot</span></code></a></td>
<td>Batchwise dot product.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.add_n" title="mxnet.symbol.add_n"><code class="xref py py-obj docutils literal"><span class="pre">add_n</span></code></a></td>
<td>Adds all input arguments element-wise.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="trigonometric-functions">
<span id="id5"></span><h3>Trigonometric functions<a class="headerlink" href="#trigonometric-functions" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.sin" title="mxnet.symbol.sin"><code class="xref py py-obj docutils literal"><span class="pre">sin</span></code></a></td>
<td>Computes the element-wise sine of the input array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.cos" title="mxnet.symbol.cos"><code class="xref py py-obj docutils literal"><span class="pre">cos</span></code></a></td>
<td>Computes the element-wise cosine of the input array.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.tan" title="mxnet.symbol.tan"><code class="xref py py-obj docutils literal"><span class="pre">tan</span></code></a></td>
<td>Computes the element-wise tangent of the input array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.arcsin" title="mxnet.symbol.arcsin"><code class="xref py py-obj docutils literal"><span class="pre">arcsin</span></code></a></td>
<td>Returns element-wise inverse sine of the input array.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.arccos" title="mxnet.symbol.arccos"><code class="xref py py-obj docutils literal"><span class="pre">arccos</span></code></a></td>
<td>Returns element-wise inverse cosine of the input array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.arctan" title="mxnet.symbol.arctan"><code class="xref py py-obj docutils literal"><span class="pre">arctan</span></code></a></td>
<td>Returns element-wise inverse tangent of the input array.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.hypot" title="mxnet.symbol.hypot"><code class="xref py py-obj docutils literal"><span class="pre">hypot</span></code></a></td>
<td>Given the “legs” of a right triangle, returns its hypotenuse.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.broadcast_hypot" title="mxnet.symbol.broadcast_hypot"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_hypot</span></code></a></td>
<td>Returns the hypotenuse of a right angled triangle, given its “legs” with broadcasting.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.degrees" title="mxnet.symbol.degrees"><code class="xref py py-obj docutils literal"><span class="pre">degrees</span></code></a></td>
<td>Converts each element of the input array from radians to degrees.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.radians" title="mxnet.symbol.radians"><code class="xref py py-obj docutils literal"><span class="pre">radians</span></code></a></td>
<td>Converts each element of the input array from degrees to radians.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="hyperbolic-functions">
<span id="id6"></span><h3>Hyperbolic functions<a class="headerlink" href="#hyperbolic-functions" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.sinh" title="mxnet.symbol.sinh"><code class="xref py py-obj docutils literal"><span class="pre">sinh</span></code></a></td>
<td>Returns the hyperbolic sine of the input array, computed element-wise.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.cosh" title="mxnet.symbol.cosh"><code class="xref py py-obj docutils literal"><span class="pre">cosh</span></code></a></td>
<td>Returns the hyperbolic cosine of the input array, computed element-wise.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.tanh" title="mxnet.symbol.tanh"><code class="xref py py-obj docutils literal"><span class="pre">tanh</span></code></a></td>
<td>Returns the hyperbolic tangent of the input array, computed element-wise.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.arcsinh" title="mxnet.symbol.arcsinh"><code class="xref py py-obj docutils literal"><span class="pre">arcsinh</span></code></a></td>
<td>Returns the element-wise inverse hyperbolic sine of the input array, computed element-wise.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.arccosh" title="mxnet.symbol.arccosh"><code class="xref py py-obj docutils literal"><span class="pre">arccosh</span></code></a></td>
<td>Returns the element-wise inverse hyperbolic cosine of the input array, computed element-wise.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.arctanh" title="mxnet.symbol.arctanh"><code class="xref py py-obj docutils literal"><span class="pre">arctanh</span></code></a></td>
<td>Returns the element-wise inverse hyperbolic tangent of the input array, computed element-wise.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="reduce-functions">
<span id="id7"></span><h3>Reduce functions<a class="headerlink" href="#reduce-functions" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.sum" title="mxnet.symbol.sum"><code class="xref py py-obj docutils literal"><span class="pre">sum</span></code></a></td>
<td>Computes the sum of array elements over given axes.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.nansum" title="mxnet.symbol.nansum"><code class="xref py py-obj docutils literal"><span class="pre">nansum</span></code></a></td>
<td>Computes the sum of array elements over given axes treating Not a Numbers (<code class="docutils literal"><span class="pre">NaN</span></code>) as zero.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.prod" title="mxnet.symbol.prod"><code class="xref py py-obj docutils literal"><span class="pre">prod</span></code></a></td>
<td>Computes the product of array elements over given axes.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.nanprod" title="mxnet.symbol.nanprod"><code class="xref py py-obj docutils literal"><span class="pre">nanprod</span></code></a></td>
<td>Computes the product of array elements over given axes treating Not a Numbers (<code class="docutils literal"><span class="pre">NaN</span></code>) as one.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.mean" title="mxnet.symbol.mean"><code class="xref py py-obj docutils literal"><span class="pre">mean</span></code></a></td>
<td>Computes the mean of array elements over given axes.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.max" title="mxnet.symbol.max"><code class="xref py py-obj docutils literal"><span class="pre">max</span></code></a></td>
<td>Computes the max of array elements over given axes.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.min" title="mxnet.symbol.min"><code class="xref py py-obj docutils literal"><span class="pre">min</span></code></a></td>
<td>Computes the min of array elements over given axes.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.norm" title="mxnet.symbol.norm"><code class="xref py py-obj docutils literal"><span class="pre">norm</span></code></a></td>
<td>Flattens the input array and then computes the l2 norm.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="rounding">
<span id="id8"></span><h3>Rounding<a class="headerlink" href="#rounding" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.round" title="mxnet.symbol.round"><code class="xref py py-obj docutils literal"><span class="pre">round</span></code></a></td>
<td>Returns element-wise rounded value to the nearest integer of the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.rint" title="mxnet.symbol.rint"><code class="xref py py-obj docutils literal"><span class="pre">rint</span></code></a></td>
<td>Returns element-wise rounded value to the nearest integer of the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.fix" title="mxnet.symbol.fix"><code class="xref py py-obj docutils literal"><span class="pre">fix</span></code></a></td>
<td>Returns element-wise rounded value to the nearest integer towards zero of the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.floor" title="mxnet.symbol.floor"><code class="xref py py-obj docutils literal"><span class="pre">floor</span></code></a></td>
<td>Returns element-wise floor of the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.ceil" title="mxnet.symbol.ceil"><code class="xref py py-obj docutils literal"><span class="pre">ceil</span></code></a></td>
<td>Returns element-wise ceiling of the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.trunc" title="mxnet.symbol.trunc"><code class="xref py py-obj docutils literal"><span class="pre">trunc</span></code></a></td>
<td>Return the element-wise truncated value of the input.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="exponents-and-logarithms">
<span id="id9"></span><h3>Exponents and logarithms<a class="headerlink" href="#exponents-and-logarithms" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.exp" title="mxnet.symbol.exp"><code class="xref py py-obj docutils literal"><span class="pre">exp</span></code></a></td>
<td>Returns element-wise exponential value of the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.expm1" title="mxnet.symbol.expm1"><code class="xref py py-obj docutils literal"><span class="pre">expm1</span></code></a></td>
<td>Returns <code class="docutils literal"><span class="pre">exp(x)</span> <span class="pre">-</span> <span class="pre">1</span></code> computed element-wise on the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.log" title="mxnet.symbol.log"><code class="xref py py-obj docutils literal"><span class="pre">log</span></code></a></td>
<td>Returns element-wise Natural logarithmic value of the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.log10" title="mxnet.symbol.log10"><code class="xref py py-obj docutils literal"><span class="pre">log10</span></code></a></td>
<td>Returns element-wise Base-10 logarithmic value of the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.log2" title="mxnet.symbol.log2"><code class="xref py py-obj docutils literal"><span class="pre">log2</span></code></a></td>
<td>Returns element-wise Base-2 logarithmic value of the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.log1p" title="mxnet.symbol.log1p"><code class="xref py py-obj docutils literal"><span class="pre">log1p</span></code></a></td>
<td>Returns element-wise <code class="docutils literal"><span class="pre">log(1</span> <span class="pre">+</span> <span class="pre">x)</span></code> value of the input.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="powers">
<span id="id10"></span><h3>Powers<a class="headerlink" href="#powers" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.broadcast_power" title="mxnet.symbol.broadcast_power"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_power</span></code></a></td>
<td>Returns result of first array elements raised to powers from second array, element-wise with broadcasting.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.sqrt" title="mxnet.symbol.sqrt"><code class="xref py py-obj docutils literal"><span class="pre">sqrt</span></code></a></td>
<td>Returns element-wise square-root value of the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.rsqrt" title="mxnet.symbol.rsqrt"><code class="xref py py-obj docutils literal"><span class="pre">rsqrt</span></code></a></td>
<td>Returns element-wise inverse square-root value of the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.cbrt" title="mxnet.symbol.cbrt"><code class="xref py py-obj docutils literal"><span class="pre">cbrt</span></code></a></td>
<td>Returns element-wise cube-root value of the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.rcbrt" title="mxnet.symbol.rcbrt"><code class="xref py py-obj docutils literal"><span class="pre">rcbrt</span></code></a></td>
<td>Returns element-wise inverse cube-root value of the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.square" title="mxnet.symbol.square"><code class="xref py py-obj docutils literal"><span class="pre">square</span></code></a></td>
<td>Returns element-wise squared value of the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.reciprocal" title="mxnet.symbol.reciprocal"><code class="xref py py-obj docutils literal"><span class="pre">reciprocal</span></code></a></td>
<td>Returns the reciprocal of the argument, element-wise.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="comparison">
<span id="comparison"></span><h3>Comparison<a class="headerlink" href="#comparison" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.broadcast_equal" title="mxnet.symbol.broadcast_equal"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_equal</span></code></a></td>
<td>Returns the result of element-wise <strong>equal to</strong> (==) comparison operation with broadcasting.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.broadcast_not_equal" title="mxnet.symbol.broadcast_not_equal"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_not_equal</span></code></a></td>
<td>Returns the result of element-wise <strong>not equal to</strong> (!=) comparison operation with broadcasting.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.broadcast_greater" title="mxnet.symbol.broadcast_greater"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_greater</span></code></a></td>
<td>Returns the result of element-wise <strong>greater than</strong> (>) comparison operation with broadcasting.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.broadcast_greater_equal" title="mxnet.symbol.broadcast_greater_equal"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_greater_equal</span></code></a></td>
<td>Returns the result of element-wise <strong>greater than or equal to</strong> (>=) comparison operation with broadcasting.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.broadcast_lesser" title="mxnet.symbol.broadcast_lesser"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_lesser</span></code></a></td>
<td>Returns the result of element-wise <strong>lesser than</strong> (<) comparison operation with broadcasting.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.broadcast_lesser_equal" title="mxnet.symbol.broadcast_lesser_equal"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_lesser_equal</span></code></a></td>
<td>Returns the result of element-wise <strong>lesser than or equal to</strong> (<=) comparison operation with broadcasting.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="random-sampling">
<span id="random-sampling"></span><h3>Random sampling<a class="headerlink" href="#random-sampling" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.random.uniform" title="mxnet.symbol.random.uniform"><code class="xref py py-obj docutils literal"><span class="pre">mxnet.symbol.random.uniform</span></code></a></td>
<td>Draw random samples from a uniform distribution.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.random.normal" title="mxnet.symbol.random.normal"><code class="xref py py-obj docutils literal"><span class="pre">mxnet.symbol.random.normal</span></code></a></td>
<td>Draw random samples from a normal (Gaussian) distribution.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.random.gamma" title="mxnet.symbol.random.gamma"><code class="xref py py-obj docutils literal"><span class="pre">mxnet.symbol.random.gamma</span></code></a></td>
<td>Draw random samples from a gamma distribution.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.random.exponential" title="mxnet.symbol.random.exponential"><code class="xref py py-obj docutils literal"><span class="pre">mxnet.symbol.random.exponential</span></code></a></td>
<td>Draw samples from an exponential distribution.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.random.poisson" title="mxnet.symbol.random.poisson"><code class="xref py py-obj docutils literal"><span class="pre">mxnet.symbol.random.poisson</span></code></a></td>
<td>Draw random samples from a Poisson distribution.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.random.negative_binomial" title="mxnet.symbol.random.negative_binomial"><code class="xref py py-obj docutils literal"><span class="pre">mxnet.symbol.random.negative_binomial</span></code></a></td>
<td>Draw random samples from a negative binomial distribution.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.random.generalized_negative_binomial" title="mxnet.symbol.random.generalized_negative_binomial"><code class="xref py py-obj docutils literal"><span class="pre">mxnet.symbol.random.generalized_negative_binomial</span></code></a></td>
<td>Draw random samples from a generalized negative binomial distribution.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="random.html#mxnet.random.seed" title="mxnet.random.seed"><code class="xref py py-obj docutils literal"><span class="pre">mxnet.random.seed</span></code></a></td>
<td>Seeds the random number generators in MXNet.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="sorting-and-searching">
<span id="id11"></span><h3>Sorting and searching<a class="headerlink" href="#sorting-and-searching" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.sort" title="mxnet.symbol.sort"><code class="xref py py-obj docutils literal"><span class="pre">sort</span></code></a></td>
<td>Returns a sorted copy of an input array along the given axis.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.topk" title="mxnet.symbol.topk"><code class="xref py py-obj docutils literal"><span class="pre">topk</span></code></a></td>
<td>Returns the top <em>k</em> elements in an input array along the given axis.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.argsort" title="mxnet.symbol.argsort"><code class="xref py py-obj docutils literal"><span class="pre">argsort</span></code></a></td>
<td>Returns the indices that would sort an input array along the given axis.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.argmax" title="mxnet.symbol.argmax"><code class="xref py py-obj docutils literal"><span class="pre">argmax</span></code></a></td>
<td>Returns indices of the maximum values along an axis.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.argmin" title="mxnet.symbol.argmin"><code class="xref py py-obj docutils literal"><span class="pre">argmin</span></code></a></td>
<td>Returns indices of the minimum values along an axis.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="sequence-operation">
<span id="sequence-operation"></span><h3>Sequence operation<a class="headerlink" href="#sequence-operation" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.SequenceLast" title="mxnet.symbol.SequenceLast"><code class="xref py py-obj docutils literal"><span class="pre">SequenceLast</span></code></a></td>
<td>Takes the last element of a sequence.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.SequenceMask" title="mxnet.symbol.SequenceMask"><code class="xref py py-obj docutils literal"><span class="pre">SequenceMask</span></code></a></td>
<td>Sets all elements outside the sequence to a constant value.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.SequenceReverse" title="mxnet.symbol.SequenceReverse"><code class="xref py py-obj docutils literal"><span class="pre">SequenceReverse</span></code></a></td>
<td>Reverses the elements of each sequence.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="miscellaneous">
<span id="id12"></span><h3>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.maximum" title="mxnet.symbol.maximum"><code class="xref py py-obj docutils literal"><span class="pre">maximum</span></code></a></td>
<td>Returns element-wise maximum of the input elements.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.minimum" title="mxnet.symbol.minimum"><code class="xref py py-obj docutils literal"><span class="pre">minimum</span></code></a></td>
<td>Returns element-wise minimum of the input elements.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.broadcast_maximum" title="mxnet.symbol.broadcast_maximum"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_maximum</span></code></a></td>
<td>Returns element-wise maximum of the input arrays with broadcasting.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.broadcast_minimum" title="mxnet.symbol.broadcast_minimum"><code class="xref py py-obj docutils literal"><span class="pre">broadcast_minimum</span></code></a></td>
<td>Returns element-wise minimum of the input arrays with broadcasting.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.clip" title="mxnet.symbol.clip"><code class="xref py py-obj docutils literal"><span class="pre">clip</span></code></a></td>
<td>Clips (limits) the values in an array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.abs" title="mxnet.symbol.abs"><code class="xref py py-obj docutils literal"><span class="pre">abs</span></code></a></td>
<td>Returns element-wise absolute value of the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.sign" title="mxnet.symbol.sign"><code class="xref py py-obj docutils literal"><span class="pre">sign</span></code></a></td>
<td>Returns element-wise sign of the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.gamma" title="mxnet.symbol.gamma"><code class="xref py py-obj docutils literal"><span class="pre">gamma</span></code></a></td>
<td>Returns the gamma function (extension of the factorial function to the reals), computed element-wise on the input array.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.gammaln" title="mxnet.symbol.gammaln"><code class="xref py py-obj docutils literal"><span class="pre">gammaln</span></code></a></td>
<td>Returns element-wise log of the absolute value of the gamma function of the input.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="neural-network">
<span id="neural-network"></span><h2>Neural network<a class="headerlink" href="#neural-network" title="Permalink to this headline"></a></h2>
<div class="section" id="basic">
<span id="basic"></span><h3>Basic<a class="headerlink" href="#basic" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.FullyConnected" title="mxnet.symbol.FullyConnected"><code class="xref py py-obj docutils literal"><span class="pre">FullyConnected</span></code></a></td>
<td>Applies a linear transformation: <span class="math">\(Y = XW^T + b\)</span>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Convolution" title="mxnet.symbol.Convolution"><code class="xref py py-obj docutils literal"><span class="pre">Convolution</span></code></a></td>
<td>Compute <em>N</em>-D convolution on <em>(N+2)</em>-D input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Activation" title="mxnet.symbol.Activation"><code class="xref py py-obj docutils literal"><span class="pre">Activation</span></code></a></td>
<td>Applies an activation function element-wise to the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.BatchNorm" title="mxnet.symbol.BatchNorm"><code class="xref py py-obj docutils literal"><span class="pre">BatchNorm</span></code></a></td>
<td>Batch normalization.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Pooling" title="mxnet.symbol.Pooling"><code class="xref py py-obj docutils literal"><span class="pre">Pooling</span></code></a></td>
<td>Performs pooling on the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.SoftmaxOutput" title="mxnet.symbol.SoftmaxOutput"><code class="xref py py-obj docutils literal"><span class="pre">SoftmaxOutput</span></code></a></td>
<td>Computes the gradient of cross entropy loss with respect to softmax output.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.softmax" title="mxnet.symbol.softmax"><code class="xref py py-obj docutils literal"><span class="pre">softmax</span></code></a></td>
<td>Applies the softmax function.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.log_softmax" title="mxnet.symbol.log_softmax"><code class="xref py py-obj docutils literal"><span class="pre">log_softmax</span></code></a></td>
<td>Computes the log softmax of the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.relu" title="mxnet.symbol.relu"><code class="xref py py-obj docutils literal"><span class="pre">relu</span></code></a></td>
<td>Computes rectified linear.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.sigmoid" title="mxnet.symbol.sigmoid"><code class="xref py py-obj docutils literal"><span class="pre">sigmoid</span></code></a></td>
<td>Computes sigmoid of x element-wise.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="more">
<span id="more"></span><h3>More<a class="headerlink" href="#more" title="Permalink to this headline"></a></h3>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Correlation" title="mxnet.symbol.Correlation"><code class="xref py py-obj docutils literal"><span class="pre">Correlation</span></code></a></td>
<td>Applies correlation to inputs.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Deconvolution" title="mxnet.symbol.Deconvolution"><code class="xref py py-obj docutils literal"><span class="pre">Deconvolution</span></code></a></td>
<td>Computes 1D or 2D transposed convolution (aka fractionally strided convolution) of the input tensor.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.RNN" title="mxnet.symbol.RNN"><code class="xref py py-obj docutils literal"><span class="pre">RNN</span></code></a></td>
<td>Applies a recurrent layer to input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.Embedding" title="mxnet.symbol.Embedding"><code class="xref py py-obj docutils literal"><span class="pre">Embedding</span></code></a></td>
<td>Maps integer indices to vector representations (embeddings).</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.LeakyReLU" title="mxnet.symbol.LeakyReLU"><code class="xref py py-obj docutils literal"><span class="pre">LeakyReLU</span></code></a></td>
<td>Applies Leaky rectified linear unit activation element-wise to the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.InstanceNorm" title="mxnet.symbol.InstanceNorm"><code class="xref py py-obj docutils literal"><span class="pre">InstanceNorm</span></code></a></td>
<td>Applies instance normalization to the n-dimensional input array.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.L2Normalization" title="mxnet.symbol.L2Normalization"><code class="xref py py-obj docutils literal"><span class="pre">L2Normalization</span></code></a></td>
<td>Normalize the input array using the L2 norm.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.LRN" title="mxnet.symbol.LRN"><code class="xref py py-obj docutils literal"><span class="pre">LRN</span></code></a></td>
<td>Applies local response normalization to the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.ROIPooling" title="mxnet.symbol.ROIPooling"><code class="xref py py-obj docutils literal"><span class="pre">ROIPooling</span></code></a></td>
<td>Performs region of interest(ROI) pooling on the input array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.SoftmaxActivation" title="mxnet.symbol.SoftmaxActivation"><code class="xref py py-obj docutils literal"><span class="pre">SoftmaxActivation</span></code></a></td>
<td>Applies softmax activation to input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Dropout" title="mxnet.symbol.Dropout"><code class="xref py py-obj docutils literal"><span class="pre">Dropout</span></code></a></td>
<td>Applies dropout operation to input array.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.BilinearSampler" title="mxnet.symbol.BilinearSampler"><code class="xref py py-obj docutils literal"><span class="pre">BilinearSampler</span></code></a></td>
<td>Applies bilinear sampling to input feature map.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.GridGenerator" title="mxnet.symbol.GridGenerator"><code class="xref py py-obj docutils literal"><span class="pre">GridGenerator</span></code></a></td>
<td>Generates 2D sampling grid for bilinear sampling.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.UpSampling" title="mxnet.symbol.UpSampling"><code class="xref py py-obj docutils literal"><span class="pre">UpSampling</span></code></a></td>
<td>Performs nearest neighbor/bilinear up sampling to inputs.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.SpatialTransformer" title="mxnet.symbol.SpatialTransformer"><code class="xref py py-obj docutils literal"><span class="pre">SpatialTransformer</span></code></a></td>
<td>Applies a spatial transformer to input feature map.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.LinearRegressionOutput" title="mxnet.symbol.LinearRegressionOutput"><code class="xref py py-obj docutils literal"><span class="pre">LinearRegressionOutput</span></code></a></td>
<td>Computes and optimizes for squared loss during backward propagation.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.LogisticRegressionOutput" title="mxnet.symbol.LogisticRegressionOutput"><code class="xref py py-obj docutils literal"><span class="pre">LogisticRegressionOutput</span></code></a></td>
<td>Applies a logistic function to the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.MAERegressionOutput" title="mxnet.symbol.MAERegressionOutput"><code class="xref py py-obj docutils literal"><span class="pre">MAERegressionOutput</span></code></a></td>
<td>Computes mean absolute error of the input.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.SVMOutput" title="mxnet.symbol.SVMOutput"><code class="xref py py-obj docutils literal"><span class="pre">SVMOutput</span></code></a></td>
<td>Computes support vector machine based transformation of the input.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.softmax_cross_entropy" title="mxnet.symbol.softmax_cross_entropy"><code class="xref py py-obj docutils literal"><span class="pre">softmax_cross_entropy</span></code></a></td>
<td>Calculate cross entropy of softmax output and one-hot label.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.smooth_l1" title="mxnet.symbol.smooth_l1"><code class="xref py py-obj docutils literal"><span class="pre">smooth_l1</span></code></a></td>
<td>Calculate Smooth L1 Loss(lhs, scalar) by summing</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.IdentityAttachKLSparseReg" title="mxnet.symbol.IdentityAttachKLSparseReg"><code class="xref py py-obj docutils literal"><span class="pre">IdentityAttachKLSparseReg</span></code></a></td>
<td>Apply a sparse regularization to the output a sigmoid activation function.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.MakeLoss" title="mxnet.symbol.MakeLoss"><code class="xref py py-obj docutils literal"><span class="pre">MakeLoss</span></code></a></td>
<td>Make your own loss function in network construction.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#mxnet.symbol.BlockGrad" title="mxnet.symbol.BlockGrad"><code class="xref py py-obj docutils literal"><span class="pre">BlockGrad</span></code></a></td>
<td>Stops gradient computation.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#mxnet.symbol.Custom" title="mxnet.symbol.Custom"><code class="xref py py-obj docutils literal"><span class="pre">Custom</span></code></a></td>
<td>Apply a custom operator implemented in a frontend language (like Python).</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="api-reference">
<span id="api-reference"></span><h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline"></a></h2>
<script src="../../../_static/js/auto_module_index.js" type="text/javascript"></script><dl class="class">
<dt id="mxnet.symbol.Symbol">
<em class="property">class </em><code class="descclassname">mxnet.symbol.</code><code class="descname">Symbol</code><span class="sig-paren">(</span><em>handle</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol" title="Permalink to this definition"></a></dt>
<dd><p>Symbol is symbolic graph of the mxnet.</p>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__repr__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__repr__" title="Permalink to this definition"></a></dt>
<dd><p>Gets a string representation of the symbol.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__iter__">
<code class="descname">__iter__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__iter__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__iter__" title="Permalink to this definition"></a></dt>
<dd><p>Returns a generator object of symbol.</p>
<p>One can loop through the returned object list to get outputs.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span><span class="o">+</span><span class="n">b</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'d'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">e</span> <span class="o">=</span> <span class="n">d</span><span class="o">+</span><span class="n">c</span>
<span class="gp">>>> </span><span class="n">out</span> <span class="o">=</span> <span class="n">e</span><span class="o">.</span><span class="n">get_children</span><span class="p">()</span>
<span class="gp">>>> </span><span class="n">out</span>
<span class="go"><Symbol Grouped></span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">out</span><span class="p">:</span>
<span class="gp">... </span> <span class="n">i</span>
<span class="gp">...</span>
<span class="go"><Symbol d></span>
<span class="go"><Symbol _plus0></span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__add__">
<code class="descname">__add__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__add__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__add__" title="Permalink to this definition"></a></dt>
<dd><p>x.__add__(y) <=> x+y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_add</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__sub__">
<code class="descname">__sub__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__sub__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__sub__" title="Permalink to this definition"></a></dt>
<dd><p>x.__sub__(y) <=> x-y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_sub</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__rsub__">
<code class="descname">__rsub__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__rsub__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__rsub__" title="Permalink to this definition"></a></dt>
<dd><p>x.__rsub__(y) <=> y-x</p>
<p>Only <cite>NDArray</cite> is supported for now.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span><span class="o">*</span><span class="mi">3</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span>
<span class="gp">>>> </span><span class="n">x</span><span class="o">.</span><span class="fm">__rsub__</span><span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([[-2., -2., -2.],</span>
<span class="go"> [-2., -2., -2.]], dtype=float32)</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__mul__">
<code class="descname">__mul__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__mul__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__mul__" title="Permalink to this definition"></a></dt>
<dd><p>x.__mul__(y) <=> x*y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_mul</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__div__">
<code class="descname">__div__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__div__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__div__" title="Permalink to this definition"></a></dt>
<dd><p>x.__div__(y) <=> x/y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_div</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__rdiv__">
<code class="descname">__rdiv__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__rdiv__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__rdiv__" title="Permalink to this definition"></a></dt>
<dd><p>x.__rdiv__(y) <=> y/x</p>
<p>Only <cite>NDArray</cite> is supported for now.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span><span class="o">*</span><span class="mi">3</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span>
<span class="gp">>>> </span><span class="n">x</span><span class="o">.</span><span class="fm">__rdiv__</span><span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([[ 0.33333334, 0.33333334, 0.33333334],</span>
<span class="go"> [ 0.33333334, 0.33333334, 0.33333334]], dtype=float32)</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__mod__">
<code class="descname">__mod__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__mod__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__mod__" title="Permalink to this definition"></a></dt>
<dd><p>x.__mod__(y) <=> x%y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_mod</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__rmod__">
<code class="descname">__rmod__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__rmod__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__rmod__" title="Permalink to this definition"></a></dt>
<dd><p>x.__rmod__(y) <=> y%x</p>
<p>Only <cite>NDArray</cite> is supported for now.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span><span class="o">*</span><span class="mi">3</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span>
<span class="gp">>>> </span><span class="n">x</span><span class="o">.</span><span class="fm">__rmod__</span><span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([[ 1., 1., 1.,</span>
<span class="go"> [ 1., 1., 1., dtype=float32)</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__pow__">
<code class="descname">__pow__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__pow__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__pow__" title="Permalink to this definition"></a></dt>
<dd><p>x.__pow__(y) <=> x**y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_pow</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__neg__">
<code class="descname">__neg__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__neg__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__neg__" title="Permalink to this definition"></a></dt>
<dd><p>x.__neg__() <=> -x</p>
<p>Numerical negative, element-wise.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">a</span>
<span class="go"><Symbol a></span>
<span class="gp">>>> </span><span class="o">-</span><span class="n">a</span>
<span class="go"><Symbol _mulscalar0></span>
<span class="gp">>>> </span><span class="n">a_neg</span> <span class="o">=</span> <span class="n">a</span><span class="o">.</span><span class="fm">__neg__</span><span class="p">()</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a_neg</span><span class="o">*</span><span class="n">b</span>
<span class="gp">>>> </span><span class="n">ex</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">ctx</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">cpu</span><span class="p">(),</span> <span class="n">a</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]),</span> <span class="n">b</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]))</span>
<span class="gp">>>> </span><span class="n">ex</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([[-1., -1., -1.],</span>
<span class="go"> [-1., -1., -1.]], dtype=float32)</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__deepcopy__">
<code class="descname">__deepcopy__</code><span class="sig-paren">(</span><em>_</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__deepcopy__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__deepcopy__" title="Permalink to this definition"></a></dt>
<dd><p>Returns a deep copy of the input object.</p>
<p>This function returns a deep copy of the input object including the current state
of all its parameters such as weights, biases, etc.</p>
<p>Any changes made to the deep copy do not reflect in the original object.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">copy</span>
<span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">data_1</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">data_1</span> <span class="o">=</span> <span class="mi">2</span><span class="o">*</span><span class="n">data</span>
<span class="gp">>>> </span><span class="n">data_1</span><span class="o">.</span><span class="n">tojson</span><span class="p">()</span>
<span class="gp">>>> </span><span class="n">data_1</span> <span class="ow">is</span> <span class="n">data</span> <span class="c1"># Data got modified</span>
<span class="go">False</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__eq__">
<code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__eq__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__eq__" title="Permalink to this definition"></a></dt>
<dd><p>x.__eq__(y) <=> x==y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_equal</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__ne__">
<code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__ne__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__ne__" title="Permalink to this definition"></a></dt>
<dd><p>x.__ne__(y) <=> x!=y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_not_equal</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__gt__">
<code class="descname">__gt__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__gt__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__gt__" title="Permalink to this definition"></a></dt>
<dd><p>x.__gt__(y) <=> x>y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_greater</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__ge__">
<code class="descname">__ge__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__ge__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__ge__" title="Permalink to this definition"></a></dt>
<dd><p>x.__ge__(y) <=> x>=y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_greater_equal</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__lt__">
<code class="descname">__lt__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__lt__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__lt__" title="Permalink to this definition"></a></dt>
<dd><p>x.__lt__(y) <=> x<y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_lesser</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__le__">
<code class="descname">__le__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__le__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__le__" title="Permalink to this definition"></a></dt>
<dd><p>x.__le__(y) <=> x<=y</p>
<p>Scalar input is supported.
Broadcasting is not supported. Use <cite>broadcast_lesser_equal</cite> instead.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__call__">
<code class="descname">__call__</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__call__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__call__" title="Permalink to this definition"></a></dt>
<dd><p>Composes symbol using inputs.</p>
<p>x.__call__(y, z) <=> x(y,z)</p>
<p>This function internally calls <cite>_compose</cite> to compose the symbol and
returns the composed symbol.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">symbol</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">net1</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">symbol</span><span class="o">.</span><span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'fc1'</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">net2</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">symbol</span><span class="o">.</span><span class="n">FullyConnected</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">'fc3'</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">composed</span> <span class="o">=</span> <span class="n">net2</span><span class="p">(</span><span class="n">fc3_data</span><span class="o">=</span><span class="n">net1</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'composed'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">composed</span>
<span class="go"><Symbol composed></span>
<span class="gp">>>> </span><span class="n">called</span> <span class="o">=</span> <span class="n">net2</span><span class="o">.</span><span class="fm">__call__</span><span class="p">(</span><span class="n">fc3_data</span><span class="o">=</span><span class="n">net1</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'composed'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">called</span>
<span class="go"><Symbol composed></span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>args</strong> – Positional arguments.</li>
<li><strong>kwargs</strong> – Keyword arguments.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">The resulting symbol.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__getitem__">
<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__getitem__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__getitem__" title="Permalink to this definition"></a></dt>
<dd><p>x.__getitem__(i) <=> x[i]</p>
<p>Returns a sliced view of the input symbol.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">a</span><span class="o">.</span><span class="fm">__getitem__</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="go"><Symbol a></span>
<span class="gp">>>> </span><span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="go"><Symbol a></span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<em>int or str</em>) – Indexing key</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="mxnet.symbol.Symbol.name">
<code class="descname">name</code><a class="headerlink" href="#mxnet.symbol.Symbol.name" title="Permalink to this definition"></a></dt>
<dd><p>Gets name string from the symbol, this function only works for non-grouped symbol.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>value</strong>
The name of this symbol, returns <code class="docutils literal"><span class="pre">None</span></code> for grouped symbol.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.attr">
<code class="descname">attr</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.attr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.attr" title="Permalink to this definition"></a></dt>
<dd><p>Returns the attribute string for corresponding input key from the symbol.</p>
<p>This function only works for non-grouped symbols.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">,</span> <span class="n">attr</span><span class="o">=</span><span class="p">{</span><span class="s1">'mood'</span><span class="p">:</span> <span class="s1">'angry'</span><span class="p">})</span>
<span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">attr</span><span class="p">(</span><span class="s1">'mood'</span><span class="p">)</span>
<span class="go">'angry'</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<em>str</em>) – The key corresponding to the desired attribute.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>value</strong>
The desired attribute value, returns <code class="docutils literal"><span class="pre">None</span></code> if the attribute does not exist.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.list_attr">
<code class="descname">list_attr</code><span class="sig-paren">(</span><em>recursive=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.list_attr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.list_attr" title="Permalink to this definition"></a></dt>
<dd><p>Gets all attributes from the symbol.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">,</span> <span class="n">attr</span><span class="o">=</span><span class="p">{</span><span class="s1">'mood'</span><span class="p">:</span> <span class="s1">'angry'</span><span class="p">})</span>
<span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">list_attr</span><span class="p">()</span>
<span class="go">{'mood': 'angry'}</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>ret</strong>
A dictionary mapping attribute keys to values.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">Dict of str to str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.attr_dict">
<code class="descname">attr_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.attr_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.attr_dict" title="Permalink to this definition"></a></dt>
<dd><p>Recursively gets all attributes from the symbol and its children.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'a'</span><span class="p">,</span> <span class="n">attr</span><span class="o">=</span><span class="p">{</span><span class="s1">'a1'</span><span class="p">:</span><span class="s1">'a2'</span><span class="p">})</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'b'</span><span class="p">,</span> <span class="n">attr</span><span class="o">=</span><span class="p">{</span><span class="s1">'b1'</span><span class="p">:</span><span class="s1">'b2'</span><span class="p">})</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span><span class="o">+</span><span class="n">b</span>
<span class="gp">>>> </span><span class="n">c</span><span class="o">.</span><span class="n">attr_dict</span><span class="p">()</span>
<span class="go">{'a': {'a1': 'a2'}, 'b': {'b1': 'b2'}}</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>ret</strong>
There is a key in the returned dict for every child with non-empty attribute set.
For each symbol, the name of the symbol is its key in the dict
and the correspond value is that symbol’s attribute list (itself a dictionary).</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">Dict of str to dict</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.get_internals">
<code class="descname">get_internals</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.get_internals"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.get_internals" title="Permalink to this definition"></a></dt>
<dd><p>Gets a new grouped symbol <cite>sgroup</cite>. The output of <cite>sgroup</cite> is a list of
outputs of all of the internal nodes.</p>
<p>Consider the following code:</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">get_internals</span><span class="p">()</span>
<span class="gp">>>> </span><span class="n">d</span>
<span class="go"><Symbol Grouped></span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">list_outputs</span><span class="p">()</span>
<span class="go">['a', 'b', '_plus4_output']</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>sgroup</strong>
A symbol group containing all internal and leaf nodes of the computation graph
used to compute the symbol.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.get_children">
<code class="descname">get_children</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.get_children"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.get_children" title="Permalink to this definition"></a></dt>
<dd><p>Gets a new grouped symbol whose output contains
inputs to output nodes of the original symbol.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'x'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'y'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'z'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">y</span><span class="o">+</span><span class="n">z</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">x</span><span class="o">+</span><span class="n">a</span>
<span class="gp">>>> </span><span class="n">b</span><span class="o">.</span><span class="n">get_children</span><span class="p">()</span>
<span class="go"><Symbol Grouped></span>
<span class="gp">>>> </span><span class="n">b</span><span class="o">.</span><span class="n">get_children</span><span class="p">()</span><span class="o">.</span><span class="n">list_outputs</span><span class="p">()</span>
<span class="go">['x', '_plus10_output']</span>
<span class="gp">>>> </span><span class="n">b</span><span class="o">.</span><span class="n">get_children</span><span class="p">()</span><span class="o">.</span><span class="n">get_children</span><span class="p">()</span><span class="o">.</span><span class="n">list_outputs</span><span class="p">()</span>
<span class="go">['y', 'z']</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>sgroup</strong>
The children of the head node. If the symbol has no
inputs then <code class="docutils literal"><span class="pre">None</span></code> will be returned.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">Symbol or None</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.list_arguments">
<code class="descname">list_arguments</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.list_arguments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.list_arguments" title="Permalink to this definition"></a></dt>
<dd><p>Lists all the arguments in the symbol.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="n">c</span><span class="o">.</span><span class="n">list_arguments</span>
<span class="go">['a', 'b']</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>args</strong>
List containing the names of all the arguments required to compute the symbol.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list of string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.list_outputs">
<code class="descname">list_outputs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.list_outputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.list_outputs" title="Permalink to this definition"></a></dt>
<dd><p>Lists all the outputs in the symbol.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="n">c</span><span class="o">.</span><span class="n">list_outputs</span><span class="p">()</span>
<span class="go">['_plus12_output']</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">List of all the outputs.
For most symbols, this list contains only the name of this symbol.
For symbol groups, this is a list with the names of all symbols
in the group.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list of str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.__len__">
<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.__len__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.__len__" title="Permalink to this definition"></a></dt>
<dd><p>Get number of outputs for the symbol.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="nb">len</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>len(self)</strong>
Number of outputs</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">Number of outputs</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.list_auxiliary_states">
<code class="descname">list_auxiliary_states</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.list_auxiliary_states"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.list_auxiliary_states" title="Permalink to this definition"></a></dt>
<dd><p>Lists all the auxiliary states in the symbol.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="n">c</span><span class="o">.</span><span class="n">list_auxiliary_states</span><span class="p">()</span>
<span class="go">[]</span>
</pre></div>
</div>
<p>Example of auxiliary states in <cite>BatchNorm</cite>.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">symbol</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">weight</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">'fc1_weight'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">fc1</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">symbol</span><span class="o">.</span><span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span> <span class="o">=</span> <span class="n">data</span><span class="p">,</span> <span class="n">weight</span><span class="o">=</span><span class="n">weight</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'fc1'</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">128</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">fc2</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">symbol</span><span class="o">.</span><span class="n">BatchNorm</span><span class="p">(</span><span class="n">fc1</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'batchnorm0'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">fc2</span><span class="o">.</span><span class="n">list_auxiliary_states</span><span class="p">()</span>
<span class="go">['batchnorm0_moving_mean', 'batchnorm0_moving_var']</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>aux_states</strong>
List of the auxiliary states in input symbol.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list of str</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<p>Auxiliary states are special states of symbols that do not correspond to an argument,
and are not updated by gradient descent. Common examples of auxiliary states
include the <cite>moving_mean</cite> and <cite>moving_variance</cite> in <cite>BatchNorm</cite>.
Most operators do not have auxiliary states.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.list_inputs">
<code class="descname">list_inputs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.list_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.list_inputs" title="Permalink to this definition"></a></dt>
<dd><p>Lists all arguments and auxiliary states of this Symbol.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>inputs</strong>
List of all inputs.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list of str</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">bn</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">BatchNorm</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">'bn'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">bn</span><span class="o">.</span><span class="n">list_arguments</span><span class="p">()</span>
<span class="go">['bn_data', 'bn_gamma', 'bn_beta']</span>
<span class="gp">>>> </span><span class="n">bn</span><span class="o">.</span><span class="n">list_auxiliary_states</span><span class="p">()</span>
<span class="go">['bn_moving_mean', 'bn_moving_var']</span>
<span class="gp">>>> </span><span class="n">bn</span><span class="o">.</span><span class="n">list_inputs</span><span class="p">()</span>
<span class="go">['bn_data', 'bn_gamma', 'bn_beta', 'bn_moving_mean', 'bn_moving_var']</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.infer_type">
<code class="descname">infer_type</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.infer_type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.infer_type" title="Permalink to this definition"></a></dt>
<dd><p>Infers the type of all arguments and all outputs, given the known types
for some arguments.</p>
<p>This function takes the known types of some arguments in either positional way
or keyword argument way as input. It returns a tuple of <cite>None</cite> values
if there is not enough information to deduce the missing types.</p>
<p>Inconsistencies in the known types will cause an error to be raised.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="n">arg_types</span><span class="p">,</span> <span class="n">out_types</span><span class="p">,</span> <span class="n">aux_types</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">infer_type</span><span class="p">(</span><span class="n">a</span><span class="o">=</span><span class="s1">'float32'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">arg_types</span>
<span class="go">[<type 'numpy.float32'>, <type 'numpy.float32'>]</span>
<span class="gp">>>> </span><span class="n">out_types</span>
<span class="go">[<type 'numpy.float32'>]</span>
<span class="gp">>>> </span><span class="n">aux_types</span>
<span class="go">[]</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>*args</strong><p>Type of known arguments in a positional way.
Unknown type can be marked as None.</p>
</li>
<li><strong>**kwargs</strong><p>Keyword arguments of known types.</p>
</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
<li><strong>arg_types</strong> (<em>list of numpy.dtype or None</em>) –
List of argument types.
The order is same as the order of list_arguments().</li>
<li><strong>out_types</strong> (<em>list of numpy.dtype or None</em>) –
List of output types.
The order is same as the order of list_outputs().</li>
<li><strong>aux_types</strong> (<em>list of numpy.dtype or None</em>) –
List of auxiliary state types.
The order is same as the order of list_auxiliary_states().</li>
</ul>
</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.infer_shape">
<code class="descname">infer_shape</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.infer_shape"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.infer_shape" title="Permalink to this definition"></a></dt>
<dd><p>Infers the shapes of all arguments and all outputs given the known shapes of
some arguments.</p>
<p>This function takes the known shapes of some arguments in either positional way
or keyword argument way as input. It returns a tuple of <cite>None</cite> values
if there is not enough information to deduce the missing shapes.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="n">arg_shapes</span><span class="p">,</span> <span class="n">out_shapes</span><span class="p">,</span> <span class="n">aux_shapes</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">infer_shape</span><span class="p">(</span><span class="n">a</span><span class="o">=</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span>
<span class="gp">>>> </span><span class="n">arg_shapes</span>
<span class="go">[(3L, 3L), (3L, 3L)]</span>
<span class="gp">>>> </span><span class="n">out_shapes</span>
<span class="go">[(3L, 3L)]</span>
<span class="gp">>>> </span><span class="n">aux_shapes</span>
<span class="go">[]</span>
<span class="gp">>>> </span><span class="n">c</span><span class="o">.</span><span class="n">infer_shape</span><span class="p">(</span><span class="n">a</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span> <span class="c1"># 0s in shape means unknown dimensions. So, returns None.</span>
<span class="go">(None, None, None)</span>
</pre></div>
</div>
<p>Inconsistencies in the known shapes will cause an error to be raised.
See the following example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">out</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'fc1'</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">1000</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">out</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Activation</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">out</span><span class="p">,</span> <span class="n">act_type</span><span class="o">=</span><span class="s1">'relu'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">out</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">out</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'fc2'</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">weight_shape</span><span class="o">=</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">data_shape</span> <span class="o">=</span> <span class="p">(</span><span class="mi">100</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">out</span><span class="o">.</span><span class="n">infer_shape</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data_shape</span><span class="p">,</span> <span class="n">fc1_weight</span><span class="o">=</span><span class="n">weight_shape</span><span class="p">)</span>
<span class="go">Error in operator fc1: Shape inconsistent, Provided=(1,100), inferred shape=(1000,100)</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>*args</strong><p>Shape of arguments in a positional way.
Unknown shape can be marked as None.</p>
</li>
<li><strong>**kwargs</strong><p>Keyword arguments of the known shapes.</p>
</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
<li><strong>arg_shapes</strong> (<em>list of tuple or None</em>) –
List of argument shapes.
The order is same as the order of list_arguments().</li>
<li><strong>out_shapes</strong> (<em>list of tuple or None</em>) –
List of output shapes.
The order is same as the order of list_outputs().</li>
<li><strong>aux_shapes</strong> (<em>list of tuple or None</em>) –
List of auxiliary state shapes.
The order is same as the order of list_auxiliary_states().</li>
</ul>
</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.infer_shape_partial">
<code class="descname">infer_shape_partial</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.infer_shape_partial"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.infer_shape_partial" title="Permalink to this definition"></a></dt>
<dd><p>Infers the shape partially.</p>
<p>This functions works the same way as <cite>infer_shape</cite>,
except that this function can return partial results.</p>
<p>In the following example, information about fc2 is not available. So, <cite>infer_shape</cite>
will return a tuple of <cite>None</cite> values but <cite>infer_shape_partial</cite> will return partial values.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">prev</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'prev'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">fc1</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'fc1'</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">128</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">fc2</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">prev</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'fc2'</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">128</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">out</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Activation</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">elemwise_add</span><span class="p">(</span><span class="n">fc1</span><span class="p">,</span> <span class="n">fc2</span><span class="p">),</span> <span class="n">act_type</span><span class="o">=</span><span class="s1">'relu'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">out</span><span class="o">.</span><span class="n">list_arguments</span><span class="p">()</span>
<span class="go">['data', 'fc1_weight', 'fc1_bias', 'prev', 'fc2_weight', 'fc2_bias']</span>
<span class="gp">>>> </span><span class="n">out</span><span class="o">.</span><span class="n">infer_shape</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="mi">64</span><span class="p">))</span>
<span class="go">(None, None, None)</span>
<span class="gp">>>> </span><span class="n">out</span><span class="o">.</span><span class="n">infer_shape_partial</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="mi">64</span><span class="p">))</span>
<span class="go">([(10L, 64L), (128L, 64L), (128L,), (), (), ()], [(10L, 128L)], [])</span>
<span class="gp">>>> </span><span class="c1"># infers shape if you give information about fc2</span>
<span class="gp">>>> </span><span class="n">out</span><span class="o">.</span><span class="n">infer_shape</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="mi">64</span><span class="p">),</span> <span class="n">prev</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="mi">128</span><span class="p">))</span>
<span class="go">([(10L, 64L), (128L, 64L), (128L,), (10L, 128L), (128L, 128L), (128L,)], [(10L, 128L)], [])</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>*args</strong><p>Shape of arguments in a positional way.
Unknown shape can be marked as None</p>
</li>
<li><strong>**kwargs</strong><p>Keyword arguments of known shapes.</p>
</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
<li><strong>arg_shapes</strong> (<em>list of tuple or None</em>) –
List of argument shapes.
The order is same as the order of list_arguments().</li>
<li><strong>out_shapes</strong> (<em>list of tuple or None</em>) –
List of output shapes.
The order is same as the order of list_outputs().</li>
<li><strong>aux_shapes</strong> (<em>list of tuple or None</em>) –
List of auxiliary state shapes.
The order is same as the order of list_auxiliary_states().</li>
</ul>
</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.debug_str">
<code class="descname">debug_str</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.debug_str"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.debug_str" title="Permalink to this definition"></a></dt>
<dd><p>Gets a debug string of symbol.</p>
<p>It contains Symbol output, variables and operators in the computation graph
with their inputs, variables and attributes.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Debug string of the symbol.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">sin</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">c</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">debug_str</span><span class="p">()</span>
<span class="gp">>>> </span><span class="k">print</span> <span class="n">d</span><span class="o">.</span><span class="n">debug_str</span><span class="p">()</span>
<span class="go">Symbol Outputs:</span>
<span class="go"> output[0]=fullyconnected0(0)</span>
<span class="go">Variable:a</span>
<span class="go">--------------------</span>
<span class="go">Op:_mul_scalar, Name=_mulscalar0</span>
<span class="go">Inputs:</span>
<span class="go"> arg[0]=a(0) version=0</span>
<span class="go">Attrs:</span>
<span class="go"> scalar=2</span>
<span class="go">--------------------</span>
<span class="go">Op:sin, Name=sin0</span>
<span class="go">Inputs:</span>
<span class="go"> arg[0]=a(0) version=0</span>
<span class="go">--------------------</span>
<span class="go">Op:elemwise_add, Name=_plus0</span>
<span class="go">Inputs:</span>
<span class="go"> arg[0]=_mulscalar0(0)</span>
<span class="go"> arg[1]=sin0(0)</span>
<span class="go">Variable:fullyconnected0_weight</span>
<span class="go">Variable:fullyconnected0_bias</span>
<span class="go">--------------------</span>
<span class="go">Op:FullyConnected, Name=fullyconnected0</span>
<span class="go">Inputs:</span>
<span class="go"> arg[0]=_plus0(0)</span>
<span class="go"> arg[1]=fullyconnected0_weight(0) version=0</span>
<span class="go"> arg[2]=fullyconnected0_bias(0) version=0</span>
<span class="go">Attrs:</span>
<span class="go"> num_hidden=10</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.save">
<code class="descname">save</code><span class="sig-paren">(</span><em>fname</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.save" title="Permalink to this definition"></a></dt>
<dd><p>Saves symbol to a file.</p>
<p>You can also use pickle to do the job if you only work on python.
The advantage of <cite>load</cite>/<cite>save</cite> functions is that the file contents are language agnostic.
This means the model saved by one language binding can be loaded by a different
language binding of <cite>MXNet</cite>.
You also get the benefit of being able to directly load/save from cloud storage(S3, HDFS).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fname</strong> (<em>str</em>) – <p>The name of the file.</p>
<ul class="simple">
<li>“s3://my-bucket/path/my-s3-symbol”</li>
<li>“hdfs://my-bucket/path/my-hdfs-symbol”</li>
<li>“/path-to/my-local-symbol”</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><code class="xref py py-meth docutils literal"><span class="pre">symbol.load()</span></code></dt>
<dd>Used to load symbol from file.</dd>
</dl>
</div>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.tojson">
<code class="descname">tojson</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.tojson"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.tojson" title="Permalink to this definition"></a></dt>
<dd><p>Saves symbol to a JSON string.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><code class="xref py py-meth docutils literal"><span class="pre">symbol.load_json()</span></code></dt>
<dd>Used to load symbol from JSON string.</dd>
</dl>
</div>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.simple_bind">
<code class="descname">simple_bind</code><span class="sig-paren">(</span><em>ctx</em>, <em>grad_req='write'</em>, <em>type_dict=None</em>, <em>stype_dict=None</em>, <em>group2ctx=None</em>, <em>shared_arg_names=None</em>, <em>shared_exec=None</em>, <em>shared_buffer=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.simple_bind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.simple_bind" title="Permalink to this definition"></a></dt>
<dd><p>Bind current symbol to get an executor, allocate all the arguments needed.
Allows specifying data types.</p>
<p>This function simplifies the binding procedure. You need to specify only input data shapes.
Before binding the executor, the function allocates arguments and auxiliary states
that were not explicitly specified. Allows specifying data types.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'x'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">FullyConnected</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">exe</span> <span class="o">=</span> <span class="n">y</span><span class="o">.</span><span class="n">simple_bind</span><span class="p">(</span><span class="n">mx</span><span class="o">.</span><span class="n">cpu</span><span class="p">(),</span> <span class="n">x</span><span class="o">=</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="mi">4</span><span class="p">),</span> <span class="n">grad_req</span><span class="o">=</span><span class="s1">'null'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">exe</span><span class="o">.</span><span class="n">forward</span><span class="p">()</span>
<span class="go">[<NDArray 5x4 @cpu(0)>]</span>
<span class="gp">>>> </span><span class="n">exe</span><span class="o">.</span><span class="n">outputs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([[ 0., 0., 0., 0.],</span>
<span class="go"> [ 0., 0., 0., 0.],</span>
<span class="go"> [ 0., 0., 0., 0.],</span>
<span class="go"> [ 0., 0., 0., 0.],</span>
<span class="go"> [ 0., 0., 0., 0.]], dtype=float32)</span>
<span class="gp">>>> </span><span class="n">exe</span><span class="o">.</span><span class="n">arg_arrays</span>
<span class="go">[<NDArray 5x4 @cpu(0)>, <NDArray 4x4 @cpu(0)>, <NDArray 4 @cpu(0)>]</span>
<span class="gp">>>> </span><span class="n">exe</span><span class="o">.</span><span class="n">grad_arrays</span>
<span class="go">[<NDArray 5x4 @cpu(0)>, <NDArray 4x4 @cpu(0)>, <NDArray 4 @cpu(0)>]</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>ctx</strong> (<em>Context</em>) – The device context the generated executor to run on.</li>
<li><strong>grad_req</strong> (<em>string</em>) – <p>{‘write’, ‘add’, ‘null’}, or list of str or dict of str to str, optional
To specify how we should update the gradient to the <cite>args_grad</cite>.</p>
<ul>
<li>‘write’ means every time gradient is written to specified <cite>args_grad</cite> NDArray.</li>
<li>‘add’ means every time gradient is added to the specified NDArray.</li>
<li>‘null’ means no action is taken, the gradient may not be calculated.</li>
</ul>
</li>
<li><strong>type_dict</strong> (<em>Dict of str->numpy.dtype</em>) – Input type dictionary, name->dtype</li>
<li><strong>stype_dict</strong> (<em>Dict of str->str</em>) – Input storage type dictionary, name->storage_type</li>
<li><strong>group2ctx</strong> (<em>Dict of string to mx.Context</em>) – The dict mapping the <cite>ctx_group</cite> attribute to the context assignment.</li>
<li><strong>shared_arg_names</strong> (<em>List of string</em>) – The argument names whose <cite>NDArray</cite> of shared_exec can be reused for initializing
the current executor.</li>
<li><strong>shared_exec</strong> (<a class="reference internal" href="../executor/executor.html#mxnet.executor.Executor" title="mxnet.executor.Executor"><em>Executor</em></a>) – The executor whose arg_arrays, arg_arrays, grad_arrays, and aux_arrays can be
reused for initializing the current executor.</li>
<li><strong>shared_buffer</strong> (Dict of string to <cite>NDArray</cite>) – The dict mapping argument names to the <cite>NDArray</cite> that can be reused for initializing
the current executor. This buffer will be checked for reuse if one argument name
of the current executor is not found in <cite>shared_arg_names</cite>. The <a href="#id25"><span class="problematic" id="id26">`</span></a>NDArray`s are
expected have default storage type.</li>
<li><strong>kwargs</strong> (<em>Dict of str->shape</em>) – Input shape dictionary, name->shape</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>executor</strong>
The generated executor</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">mxnet.Executor</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.bind">
<code class="descname">bind</code><span class="sig-paren">(</span><em>ctx</em>, <em>args</em>, <em>args_grad=None</em>, <em>grad_req='write'</em>, <em>aux_states=None</em>, <em>group2ctx=None</em>, <em>shared_exec=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.bind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.bind" title="Permalink to this definition"></a></dt>
<dd><p>Binds the current symbol to an executor and returns it.</p>
<p>We first declare the computation and then bind to the data to run.
This function returns an executor which provides method <cite>forward()</cite> method for evaluation
and a <cite>outputs()</cite> method to get all the results.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="go"><Symbol _plus1></span>
<span class="gp">>>> </span><span class="n">ex</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">bind</span><span class="p">(</span><span class="n">ctx</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">cpu</span><span class="p">(),</span> <span class="n">args</span><span class="o">=</span><span class="p">{</span><span class="s1">'a'</span> <span class="p">:</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]),</span> <span class="s1">'b'</span> <span class="p">:</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">])})</span>
<span class="gp">>>> </span><span class="n">ex</span><span class="o">.</span><span class="n">forward</span><span class="p">()</span>
<span class="go">[<NDArray 2x3 @cpu(0)>]</span>
<span class="gp">>>> </span><span class="n">ex</span><span class="o">.</span><span class="n">outputs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">[[ 2. 2. 2.]</span>
<span class="go">[ 2. 2. 2.]]</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>ctx</strong> (<em>Context</em>) – The device context the generated executor to run on.</li>
<li><strong>args</strong> (<em>list of NDArray or dict of str to NDArray</em>) – <p>Input arguments to the symbol.</p>
<ul>
<li>If the input type is a list of <cite>NDArray</cite>, the order should be same as the order
of <cite>list_arguments()</cite>.</li>
<li>If the input type is a dict of str to <cite>NDArray</cite>, then it maps the name of arguments
to the corresponding <cite>NDArray</cite>.</li>
<li>In either case, all the arguments must be provided.</li>
</ul>
</li>
<li><strong>args_grad</strong> (list of NDArray or dict of str to <cite>NDArray</cite>, optional) – <p>When specified, <cite>args_grad</cite> provides NDArrays to hold
the result of gradient value in backward.</p>
<ul>
<li>If the input type is a list of <cite>NDArray</cite>, the order should be same as the order
of <cite>list_arguments()</cite>.</li>
<li>If the input type is a dict of str to <cite>NDArray</cite>, then it maps the name of arguments
to the corresponding NDArray.</li>
<li>When the type is a dict of str to <cite>NDArray</cite>, one only need to provide the dict
for required argument gradient.
Only the specified argument gradient will be calculated.</li>
</ul>
</li>
<li><strong>grad_req</strong> (<em>{'write', 'add', 'null'}, or list of str or dict of str to str, optional</em>) – <p>To specify how we should update the gradient to the <cite>args_grad</cite>.</p>
<ul>
<li>‘write’ means everytime gradient is write to specified <cite>args_grad</cite> <cite>NDArray</cite>.</li>
<li>‘add’ means everytime gradient is add to the specified NDArray.</li>
<li>‘null’ means no action is taken, the gradient may not be calculated.</li>
</ul>
</li>
<li><strong>aux_states</strong> (list of <cite>NDArray</cite>, or dict of str to <cite>NDArray</cite>, optional) – <p>Input auxiliary states to the symbol, only needed when the output of
<cite>list_auxiliary_states()</cite> is not empty.</p>
<ul>
<li>If the input type is a list of <cite>NDArray</cite>, the order should be same as the order
of <cite>list_auxiliary_states()</cite>.</li>
<li>If the input type is a dict of str to <cite>NDArray</cite>, then it maps the name of
<cite>auxiliary_states</cite> to the corresponding <cite>NDArray</cite>,</li>
<li>In either case, all the auxiliary states need to be provided.</li>
</ul>
</li>
<li><strong>group2ctx</strong> (<em>Dict of string to mx.Context</em>) – The dict mapping the <cite>ctx_group</cite> attribute to the context assignment.</li>
<li><strong>shared_exec</strong> (<em>mx.executor.Executor</em>) – Executor to share memory with. This is intended for runtime reshaping, variable length
sequences, etc. The returned executor shares state with <cite>shared_exec</cite>, and should not be
used in parallel with it.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>executor</strong>
The generated executor</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="../executor/executor.html#mxnet.executor.Executor" title="mxnet.executor.Executor">Executor</a></p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<p>Auxiliary states are the special states of symbols that do not correspond
to an argument, and do not have gradient but are still useful
for the specific operations. Common examples of auxiliary states include
the <cite>moving_mean</cite> and <cite>moving_variance</cite> states in <cite>BatchNorm</cite>.
Most operators do not have auxiliary states and in those cases,
this parameter can be safely ignored.</p>
<p>One can give up gradient by using a dict in <cite>args_grad</cite> and only specify
gradient they interested in.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.gradient">
<code class="descname">gradient</code><span class="sig-paren">(</span><em>wrt</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.gradient"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.gradient" title="Permalink to this definition"></a></dt>
<dd><p>Gets the autodiff of current symbol.</p>
<p>This function can only be used if current symbol is a loss function.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This function is currently not implemented.</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>wrt</strong> (<em>Array of String</em>) – keyword arguments of the symbol that the gradients are taken.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>grad</strong>
A gradient Symbol with returns to be the corresponding gradients.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.eval">
<code class="descname">eval</code><span class="sig-paren">(</span><em>ctx=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.eval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.eval" title="Permalink to this definition"></a></dt>
<dd><p>Evaluates a symbol given arguments.</p>
<p>The <cite>eval</cite> method combines a call to <cite>bind</cite> (which returns an executor)
with a call to <cite>forward</cite> (executor method).
For the common use case, where you might repeatedly evaluate with same arguments,
eval is slow.
In that case, you should call <cite>bind</cite> once and then repeatedly call forward.
This function allows simpler syntax for less cumbersome introspection.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="n">ex</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">ctx</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">cpu</span><span class="p">(),</span> <span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]),</span> <span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">ones</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]))</span>
<span class="gp">>>> </span><span class="n">ex</span>
<span class="go">[<NDArray 2x3 @cpu(0)>]</span>
<span class="gp">>>> </span><span class="n">ex</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([[ 2., 2., 2.],</span>
<span class="go"> [ 2., 2., 2.]], dtype=float32)</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>ctx</strong> (<em>Context</em>) – The device context the generated executor to run on.</li>
<li><strong>kwargs</strong> (Keyword arguments of type <cite>NDArray</cite>) – Input arguments to the symbol. All the arguments must be provided.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
<li><strong>result</strong> (<em>a list of NDArrays corresponding to the values taken by each symbol when</em>)</li>
<li><em>evaluated on given args. When called on a single symbol (not a group),</em></li>
<li><em>the result will be a list with one element.</em></li>
</ul>
</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.reshape">
<code class="descname">reshape</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.reshape"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.reshape" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.reshape" title="mxnet.symbol.reshape"><code class="xref py py-func docutils literal"><span class="pre">reshape()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.reshape" title="mxnet.symbol.reshape"><code class="xref py py-func docutils literal"><span class="pre">reshape()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.reshape_like">
<code class="descname">reshape_like</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.reshape_like"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.reshape_like" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.reshape_like" title="mxnet.symbol.reshape_like"><code class="xref py py-func docutils literal"><span class="pre">reshape_like()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.reshape_like" title="mxnet.symbol.reshape_like"><code class="xref py py-func docutils literal"><span class="pre">reshape_like()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.astype">
<code class="descname">astype</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.astype"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.astype" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.cast" title="mxnet.symbol.cast"><code class="xref py py-func docutils literal"><span class="pre">cast()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.cast" title="mxnet.symbol.cast"><code class="xref py py-func docutils literal"><span class="pre">cast()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.zeros_like">
<code class="descname">zeros_like</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.zeros_like"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.zeros_like" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.zeros_like" title="mxnet.symbol.zeros_like"><code class="xref py py-func docutils literal"><span class="pre">zeros_like()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.zeros_like" title="mxnet.symbol.zeros_like"><code class="xref py py-func docutils literal"><span class="pre">zeros_like()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.ones_like">
<code class="descname">ones_like</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.ones_like"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.ones_like" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.ones_like" title="mxnet.symbol.ones_like"><code class="xref py py-func docutils literal"><span class="pre">ones_like()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.ones_like" title="mxnet.symbol.ones_like"><code class="xref py py-func docutils literal"><span class="pre">ones_like()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.broadcast_axes">
<code class="descname">broadcast_axes</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.broadcast_axes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.broadcast_axes" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.broadcast_axes" title="mxnet.symbol.broadcast_axes"><code class="xref py py-func docutils literal"><span class="pre">broadcast_axes()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.broadcast_axes" title="mxnet.symbol.broadcast_axes"><code class="xref py py-func docutils literal"><span class="pre">broadcast_axes()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.repeat">
<code class="descname">repeat</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.repeat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.repeat" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.repeat" title="mxnet.symbol.repeat"><code class="xref py py-func docutils literal"><span class="pre">repeat()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.repeat" title="mxnet.symbol.repeat"><code class="xref py py-func docutils literal"><span class="pre">repeat()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.pad">
<code class="descname">pad</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.pad"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.pad" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.pad" title="mxnet.symbol.pad"><code class="xref py py-func docutils literal"><span class="pre">pad()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.pad" title="mxnet.symbol.pad"><code class="xref py py-func docutils literal"><span class="pre">pad()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.swapaxes">
<code class="descname">swapaxes</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.swapaxes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.swapaxes" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.swapaxes" title="mxnet.symbol.swapaxes"><code class="xref py py-func docutils literal"><span class="pre">swapaxes()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.swapaxes" title="mxnet.symbol.swapaxes"><code class="xref py py-func docutils literal"><span class="pre">swapaxes()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.split">
<code class="descname">split</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.split"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.split" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.split" title="mxnet.symbol.split"><code class="xref py py-func docutils literal"><span class="pre">split()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.split" title="mxnet.symbol.split"><code class="xref py py-func docutils literal"><span class="pre">split()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.slice">
<code class="descname">slice</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.slice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.slice" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.slice" title="mxnet.symbol.slice"><code class="xref py py-func docutils literal"><span class="pre">slice()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.slice" title="mxnet.symbol.slice"><code class="xref py py-func docutils literal"><span class="pre">slice()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.slice_axis">
<code class="descname">slice_axis</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.slice_axis"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.slice_axis" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.slice_axis" title="mxnet.symbol.slice_axis"><code class="xref py py-func docutils literal"><span class="pre">slice_axis()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.slice_axis" title="mxnet.symbol.slice_axis"><code class="xref py py-func docutils literal"><span class="pre">slice_axis()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.take">
<code class="descname">take</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.take"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.take" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.take" title="mxnet.symbol.take"><code class="xref py py-func docutils literal"><span class="pre">take()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.take" title="mxnet.symbol.take"><code class="xref py py-func docutils literal"><span class="pre">take()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.one_hot">
<code class="descname">one_hot</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.one_hot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.one_hot" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.one_hot" title="mxnet.symbol.one_hot"><code class="xref py py-func docutils literal"><span class="pre">one_hot()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.one_hot" title="mxnet.symbol.one_hot"><code class="xref py py-func docutils literal"><span class="pre">one_hot()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.pick">
<code class="descname">pick</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.pick"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.pick" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.pick" title="mxnet.symbol.pick"><code class="xref py py-func docutils literal"><span class="pre">pick()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.pick" title="mxnet.symbol.pick"><code class="xref py py-func docutils literal"><span class="pre">pick()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.sort">
<code class="descname">sort</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.sort"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.sort" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sort" title="mxnet.symbol.sort"><code class="xref py py-func docutils literal"><span class="pre">sort()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.sort" title="mxnet.symbol.sort"><code class="xref py py-func docutils literal"><span class="pre">sort()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.topk">
<code class="descname">topk</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.topk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.topk" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.topk" title="mxnet.symbol.topk"><code class="xref py py-func docutils literal"><span class="pre">topk()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.topk" title="mxnet.symbol.topk"><code class="xref py py-func docutils literal"><span class="pre">topk()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.argsort">
<code class="descname">argsort</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.argsort"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.argsort" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.argsort" title="mxnet.symbol.argsort"><code class="xref py py-func docutils literal"><span class="pre">argsort()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.argsort" title="mxnet.symbol.argsort"><code class="xref py py-func docutils literal"><span class="pre">argsort()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.argmax">
<code class="descname">argmax</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.argmax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.argmax" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.argmax" title="mxnet.symbol.argmax"><code class="xref py py-func docutils literal"><span class="pre">argmax()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.argmax" title="mxnet.symbol.argmax"><code class="xref py py-func docutils literal"><span class="pre">argmax()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.argmax_channel">
<code class="descname">argmax_channel</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.argmax_channel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.argmax_channel" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.argmax_channel" title="mxnet.symbol.argmax_channel"><code class="xref py py-func docutils literal"><span class="pre">argmax_channel()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.argmax_channel" title="mxnet.symbol.argmax_channel"><code class="xref py py-func docutils literal"><span class="pre">argmax_channel()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.argmin">
<code class="descname">argmin</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.argmin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.argmin" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.argmin" title="mxnet.symbol.argmin"><code class="xref py py-func docutils literal"><span class="pre">argmin()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.argmin" title="mxnet.symbol.argmin"><code class="xref py py-func docutils literal"><span class="pre">argmin()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.clip">
<code class="descname">clip</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.clip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.clip" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.clip" title="mxnet.symbol.clip"><code class="xref py py-func docutils literal"><span class="pre">clip()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.clip" title="mxnet.symbol.clip"><code class="xref py py-func docutils literal"><span class="pre">clip()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.abs">
<code class="descname">abs</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.abs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.abs" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.abs" title="mxnet.symbol.abs"><code class="xref py py-func docutils literal"><span class="pre">abs()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.abs" title="mxnet.symbol.abs"><code class="xref py py-func docutils literal"><span class="pre">abs()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.sign">
<code class="descname">sign</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.sign"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.sign" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sign" title="mxnet.symbol.sign"><code class="xref py py-func docutils literal"><span class="pre">sign()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.sign" title="mxnet.symbol.sign"><code class="xref py py-func docutils literal"><span class="pre">sign()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.flatten">
<code class="descname">flatten</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.flatten"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.flatten" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.flatten" title="mxnet.symbol.flatten"><code class="xref py py-func docutils literal"><span class="pre">flatten()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.flatten" title="mxnet.symbol.flatten"><code class="xref py py-func docutils literal"><span class="pre">flatten()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.expand_dims">
<code class="descname">expand_dims</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.expand_dims"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.expand_dims" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.expand_dims" title="mxnet.symbol.expand_dims"><code class="xref py py-func docutils literal"><span class="pre">expand_dims()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.expand_dims" title="mxnet.symbol.expand_dims"><code class="xref py py-func docutils literal"><span class="pre">expand_dims()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.broadcast_to">
<code class="descname">broadcast_to</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.broadcast_to"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.broadcast_to" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.broadcast_to" title="mxnet.symbol.broadcast_to"><code class="xref py py-func docutils literal"><span class="pre">broadcast_to()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.broadcast_to" title="mxnet.symbol.broadcast_to"><code class="xref py py-func docutils literal"><span class="pre">broadcast_to()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.tile">
<code class="descname">tile</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.tile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.tile" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.tile" title="mxnet.symbol.tile"><code class="xref py py-func docutils literal"><span class="pre">tile()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.tile" title="mxnet.symbol.tile"><code class="xref py py-func docutils literal"><span class="pre">tile()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.transpose">
<code class="descname">transpose</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.transpose"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.transpose" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.transpose" title="mxnet.symbol.transpose"><code class="xref py py-func docutils literal"><span class="pre">transpose()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.transpose" title="mxnet.symbol.transpose"><code class="xref py py-func docutils literal"><span class="pre">transpose()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.flip">
<code class="descname">flip</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.flip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.flip" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.flip" title="mxnet.symbol.flip"><code class="xref py py-func docutils literal"><span class="pre">flip()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.flip" title="mxnet.symbol.flip"><code class="xref py py-func docutils literal"><span class="pre">flip()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.sum">
<code class="descname">sum</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.sum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.sum" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sum" title="mxnet.symbol.sum"><code class="xref py py-func docutils literal"><span class="pre">sum()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.sum" title="mxnet.symbol.sum"><code class="xref py py-func docutils literal"><span class="pre">sum()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.nansum">
<code class="descname">nansum</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.nansum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.nansum" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.nansum" title="mxnet.symbol.nansum"><code class="xref py py-func docutils literal"><span class="pre">nansum()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.nansum" title="mxnet.symbol.nansum"><code class="xref py py-func docutils literal"><span class="pre">nansum()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.prod">
<code class="descname">prod</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.prod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.prod" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.prod" title="mxnet.symbol.prod"><code class="xref py py-func docutils literal"><span class="pre">prod()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.prod" title="mxnet.symbol.prod"><code class="xref py py-func docutils literal"><span class="pre">prod()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.nanprod">
<code class="descname">nanprod</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.nanprod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.nanprod" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.nanprod" title="mxnet.symbol.nanprod"><code class="xref py py-func docutils literal"><span class="pre">nanprod()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.nanprod" title="mxnet.symbol.nanprod"><code class="xref py py-func docutils literal"><span class="pre">nanprod()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.mean">
<code class="descname">mean</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.mean"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.mean" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.mean" title="mxnet.symbol.mean"><code class="xref py py-func docutils literal"><span class="pre">mean()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.mean" title="mxnet.symbol.mean"><code class="xref py py-func docutils literal"><span class="pre">mean()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.max">
<code class="descname">max</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.max"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.max" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.max" title="mxnet.symbol.max"><code class="xref py py-func docutils literal"><span class="pre">max()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.max" title="mxnet.symbol.max"><code class="xref py py-func docutils literal"><span class="pre">max()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.min">
<code class="descname">min</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.min"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.min" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.min" title="mxnet.symbol.min"><code class="xref py py-func docutils literal"><span class="pre">min()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.min" title="mxnet.symbol.min"><code class="xref py py-func docutils literal"><span class="pre">min()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.norm">
<code class="descname">norm</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.norm"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.norm" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.norm" title="mxnet.symbol.norm"><code class="xref py py-func docutils literal"><span class="pre">norm()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.norm" title="mxnet.symbol.norm"><code class="xref py py-func docutils literal"><span class="pre">norm()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.round">
<code class="descname">round</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.round"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.round" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.round" title="mxnet.symbol.round"><code class="xref py py-func docutils literal"><span class="pre">round()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.round" title="mxnet.symbol.round"><code class="xref py py-func docutils literal"><span class="pre">round()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.rint">
<code class="descname">rint</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.rint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.rint" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.rint" title="mxnet.symbol.rint"><code class="xref py py-func docutils literal"><span class="pre">rint()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.rint" title="mxnet.symbol.rint"><code class="xref py py-func docutils literal"><span class="pre">rint()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.fix">
<code class="descname">fix</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.fix"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.fix" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.fix" title="mxnet.symbol.fix"><code class="xref py py-func docutils literal"><span class="pre">fix()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.fix" title="mxnet.symbol.fix"><code class="xref py py-func docutils literal"><span class="pre">fix()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.floor">
<code class="descname">floor</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.floor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.floor" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.floor" title="mxnet.symbol.floor"><code class="xref py py-func docutils literal"><span class="pre">floor()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.floor" title="mxnet.symbol.floor"><code class="xref py py-func docutils literal"><span class="pre">floor()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.ceil">
<code class="descname">ceil</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.ceil"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.ceil" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.ceil" title="mxnet.symbol.ceil"><code class="xref py py-func docutils literal"><span class="pre">ceil()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.ceil" title="mxnet.symbol.ceil"><code class="xref py py-func docutils literal"><span class="pre">ceil()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.trunc">
<code class="descname">trunc</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.trunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.trunc" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.trunc" title="mxnet.symbol.trunc"><code class="xref py py-func docutils literal"><span class="pre">trunc()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.trunc" title="mxnet.symbol.trunc"><code class="xref py py-func docutils literal"><span class="pre">trunc()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.sin">
<code class="descname">sin</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.sin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.sin" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sin" title="mxnet.symbol.sin"><code class="xref py py-func docutils literal"><span class="pre">sin()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.sin" title="mxnet.symbol.sin"><code class="xref py py-func docutils literal"><span class="pre">sin()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.cos">
<code class="descname">cos</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.cos"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.cos" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.cos" title="mxnet.symbol.cos"><code class="xref py py-func docutils literal"><span class="pre">cos()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.cos" title="mxnet.symbol.cos"><code class="xref py py-func docutils literal"><span class="pre">cos()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.tan">
<code class="descname">tan</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.tan"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.tan" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.tan" title="mxnet.symbol.tan"><code class="xref py py-func docutils literal"><span class="pre">tan()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.tan" title="mxnet.symbol.tan"><code class="xref py py-func docutils literal"><span class="pre">tan()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.arcsin">
<code class="descname">arcsin</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.arcsin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.arcsin" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arcsin" title="mxnet.symbol.arcsin"><code class="xref py py-func docutils literal"><span class="pre">arcsin()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.arcsin" title="mxnet.symbol.arcsin"><code class="xref py py-func docutils literal"><span class="pre">arcsin()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.arccos">
<code class="descname">arccos</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.arccos"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.arccos" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arccos" title="mxnet.symbol.arccos"><code class="xref py py-func docutils literal"><span class="pre">arccos()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.arccos" title="mxnet.symbol.arccos"><code class="xref py py-func docutils literal"><span class="pre">arccos()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.arctan">
<code class="descname">arctan</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.arctan"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.arctan" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arctan" title="mxnet.symbol.arctan"><code class="xref py py-func docutils literal"><span class="pre">arctan()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.arctan" title="mxnet.symbol.arctan"><code class="xref py py-func docutils literal"><span class="pre">arctan()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.degrees">
<code class="descname">degrees</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.degrees"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.degrees" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.degrees" title="mxnet.symbol.degrees"><code class="xref py py-func docutils literal"><span class="pre">degrees()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.degrees" title="mxnet.symbol.degrees"><code class="xref py py-func docutils literal"><span class="pre">degrees()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.radians">
<code class="descname">radians</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.radians"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.radians" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.radians" title="mxnet.symbol.radians"><code class="xref py py-func docutils literal"><span class="pre">radians()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.radians" title="mxnet.symbol.radians"><code class="xref py py-func docutils literal"><span class="pre">radians()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.sinh">
<code class="descname">sinh</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.sinh"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.sinh" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sinh" title="mxnet.symbol.sinh"><code class="xref py py-func docutils literal"><span class="pre">sinh()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.sinh" title="mxnet.symbol.sinh"><code class="xref py py-func docutils literal"><span class="pre">sinh()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.cosh">
<code class="descname">cosh</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.cosh"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.cosh" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.cosh" title="mxnet.symbol.cosh"><code class="xref py py-func docutils literal"><span class="pre">cosh()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.cosh" title="mxnet.symbol.cosh"><code class="xref py py-func docutils literal"><span class="pre">cosh()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.tanh">
<code class="descname">tanh</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.tanh"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.tanh" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.tanh" title="mxnet.symbol.tanh"><code class="xref py py-func docutils literal"><span class="pre">tanh()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.tanh" title="mxnet.symbol.tanh"><code class="xref py py-func docutils literal"><span class="pre">tanh()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.arcsinh">
<code class="descname">arcsinh</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.arcsinh"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.arcsinh" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arcsinh" title="mxnet.symbol.arcsinh"><code class="xref py py-func docutils literal"><span class="pre">arcsinh()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.arcsinh" title="mxnet.symbol.arcsinh"><code class="xref py py-func docutils literal"><span class="pre">arcsinh()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.arccosh">
<code class="descname">arccosh</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.arccosh"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.arccosh" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arccosh" title="mxnet.symbol.arccosh"><code class="xref py py-func docutils literal"><span class="pre">arccosh()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.arccosh" title="mxnet.symbol.arccosh"><code class="xref py py-func docutils literal"><span class="pre">arccosh()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.arctanh">
<code class="descname">arctanh</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.arctanh"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.arctanh" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.arctanh" title="mxnet.symbol.arctanh"><code class="xref py py-func docutils literal"><span class="pre">arctanh()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.arctanh" title="mxnet.symbol.arctanh"><code class="xref py py-func docutils literal"><span class="pre">arctanh()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.exp">
<code class="descname">exp</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.exp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.exp" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.exp" title="mxnet.symbol.exp"><code class="xref py py-func docutils literal"><span class="pre">exp()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.exp" title="mxnet.symbol.exp"><code class="xref py py-func docutils literal"><span class="pre">exp()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.expm1">
<code class="descname">expm1</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.expm1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.expm1" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.expm1" title="mxnet.symbol.expm1"><code class="xref py py-func docutils literal"><span class="pre">expm1()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.expm1" title="mxnet.symbol.expm1"><code class="xref py py-func docutils literal"><span class="pre">expm1()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.log">
<code class="descname">log</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.log" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.log" title="mxnet.symbol.log"><code class="xref py py-func docutils literal"><span class="pre">log()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.log" title="mxnet.symbol.log"><code class="xref py py-func docutils literal"><span class="pre">log()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.log10">
<code class="descname">log10</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.log10"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.log10" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.log10" title="mxnet.symbol.log10"><code class="xref py py-func docutils literal"><span class="pre">log10()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.log10" title="mxnet.symbol.log10"><code class="xref py py-func docutils literal"><span class="pre">log10()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.log2">
<code class="descname">log2</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.log2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.log2" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.log2" title="mxnet.symbol.log2"><code class="xref py py-func docutils literal"><span class="pre">log2()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.log2" title="mxnet.symbol.log2"><code class="xref py py-func docutils literal"><span class="pre">log2()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.log1p">
<code class="descname">log1p</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.log1p"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.log1p" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.log1p" title="mxnet.symbol.log1p"><code class="xref py py-func docutils literal"><span class="pre">log1p()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.log1p" title="mxnet.symbol.log1p"><code class="xref py py-func docutils literal"><span class="pre">log1p()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.sqrt">
<code class="descname">sqrt</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.sqrt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.sqrt" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sqrt" title="mxnet.symbol.sqrt"><code class="xref py py-func docutils literal"><span class="pre">sqrt()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.sqrt" title="mxnet.symbol.sqrt"><code class="xref py py-func docutils literal"><span class="pre">sqrt()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.rsqrt">
<code class="descname">rsqrt</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.rsqrt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.rsqrt" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.rsqrt" title="mxnet.symbol.rsqrt"><code class="xref py py-func docutils literal"><span class="pre">rsqrt()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.rsqrt" title="mxnet.symbol.rsqrt"><code class="xref py py-func docutils literal"><span class="pre">rsqrt()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.cbrt">
<code class="descname">cbrt</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.cbrt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.cbrt" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.cbrt" title="mxnet.symbol.cbrt"><code class="xref py py-func docutils literal"><span class="pre">cbrt()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.cbrt" title="mxnet.symbol.cbrt"><code class="xref py py-func docutils literal"><span class="pre">cbrt()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.rcbrt">
<code class="descname">rcbrt</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.rcbrt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.rcbrt" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.rcbrt" title="mxnet.symbol.rcbrt"><code class="xref py py-func docutils literal"><span class="pre">rcbrt()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.rcbrt" title="mxnet.symbol.rcbrt"><code class="xref py py-func docutils literal"><span class="pre">rcbrt()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.square">
<code class="descname">square</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.square"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.square" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.square" title="mxnet.symbol.square"><code class="xref py py-func docutils literal"><span class="pre">square()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.square" title="mxnet.symbol.square"><code class="xref py py-func docutils literal"><span class="pre">square()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.reciprocal">
<code class="descname">reciprocal</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.reciprocal" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.reciprocal" title="mxnet.symbol.reciprocal"><code class="xref py py-func docutils literal"><span class="pre">reciprocal()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.reciprocal" title="mxnet.symbol.reciprocal"><code class="xref py py-func docutils literal"><span class="pre">reciprocal()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.relu">
<code class="descname">relu</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.relu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.relu" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.relu" title="mxnet.symbol.relu"><code class="xref py py-func docutils literal"><span class="pre">relu()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.relu" title="mxnet.symbol.relu"><code class="xref py py-func docutils literal"><span class="pre">relu()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.sigmoid">
<code class="descname">sigmoid</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.sigmoid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.sigmoid" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.sigmoid" title="mxnet.symbol.sigmoid"><code class="xref py py-func docutils literal"><span class="pre">sigmoid()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.sigmoid" title="mxnet.symbol.sigmoid"><code class="xref py py-func docutils literal"><span class="pre">sigmoid()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.softmax">
<code class="descname">softmax</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.softmax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.softmax" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.softmax" title="mxnet.symbol.softmax"><code class="xref py py-func docutils literal"><span class="pre">softmax()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.softmax" title="mxnet.symbol.softmax"><code class="xref py py-func docutils literal"><span class="pre">softmax()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.log_softmax">
<code class="descname">log_softmax</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.log_softmax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.log_softmax" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.log_softmax" title="mxnet.symbol.log_softmax"><code class="xref py py-func docutils literal"><span class="pre">log_softmax()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.log_softmax" title="mxnet.symbol.log_softmax"><code class="xref py py-func docutils literal"><span class="pre">log_softmax()</span></code></a>, with
this array as data.</p>
</dd></dl>
<dl class="method">
<dt id="mxnet.symbol.Symbol.squeeze">
<code class="descname">squeeze</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Symbol.squeeze"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Symbol.squeeze" title="Permalink to this definition"></a></dt>
<dd><p>Convenience fluent method for <a class="reference internal" href="#mxnet.symbol.squeeze" title="mxnet.symbol.squeeze"><code class="xref py py-func docutils literal"><span class="pre">squeeze()</span></code></a>.</p>
<p>The arguments are the same as for <a class="reference internal" href="#mxnet.symbol.squeeze" title="mxnet.symbol.squeeze"><code class="xref py py-func docutils literal"><span class="pre">squeeze()</span></code></a>, with
this array as data.</p>
</dd></dl>
</dd></dl>
<span class="target" id="module-mxnet.symbol"></span><p>Symbol API of MXNet.</p>
<dl class="function">
<dt id="mxnet.symbol.Activation">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Activation</code><span class="sig-paren">(</span><em>data=None</em>, <em>act_type=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Activation" title="Permalink to this definition"></a></dt>
<dd><p>Applies an activation function element-wise to the input.</p>
<p>The following activation functions are supported:</p>
<ul class="simple">
<li><cite>relu</cite>: Rectified Linear Unit, <span class="math">\(y = max(x, 0)\)</span></li>
<li><cite>sigmoid</cite>: <span class="math">\(y = \frac{1}{1 + exp(-x)}\)</span></li>
<li><cite>tanh</cite>: Hyperbolic tangent, <span class="math">\(y = \frac{exp(x) - exp(-x)}{exp(x) + exp(-x)}\)</span></li>
<li><cite>softrelu</cite>: Soft ReLU, or SoftPlus, <span class="math">\(y = log(1 + exp(x))\)</span></li>
<li><cite>softsign</cite>: <span class="math">\(y = \frac{x}{1 + abs(x)}\)</span></li>
</ul>
<p>Defined in src/operator/nn/activation.cc:L154</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>act_type</strong> (<em>{'relu', 'sigmoid', 'softrelu', 'softsign', 'tanh'}, required</em>) – Activation function to be applied.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<p>A one-hidden-layer MLP with ReLU activation:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">mlp</span> <span class="o">=</span> <span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">128</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'proj'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">mlp</span> <span class="o">=</span> <span class="n">Activation</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">mlp</span><span class="p">,</span> <span class="n">act_type</span><span class="o">=</span><span class="s1">'relu'</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'activation'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">mlp</span> <span class="o">=</span> <span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">mlp</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'mlp'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">mlp</span>
<span class="go"><Symbol mlp></span>
</pre></div>
</div>
<p>ReLU activation</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">test_suites</span> <span class="o">=</span> <span class="p">[</span>
<span class="gp">... </span><span class="p">(</span><span class="s1">'relu'</span><span class="p">,</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">maximum</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="mi">0</span><span class="p">)),</span>
<span class="gp">... </span><span class="p">(</span><span class="s1">'sigmoid'</span><span class="p">,</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="mi">1</span> <span class="o">/</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">np</span><span class="o">.</span><span class="n">exp</span><span class="p">(</span><span class="o">-</span><span class="n">x</span><span class="p">))),</span>
<span class="gp">... </span><span class="p">(</span><span class="s1">'tanh'</span><span class="p">,</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">tanh</span><span class="p">(</span><span class="n">x</span><span class="p">)),</span>
<span class="gp">... </span><span class="p">(</span><span class="s1">'softrelu'</span><span class="p">,</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">np</span><span class="o">.</span><span class="n">exp</span><span class="p">(</span><span class="n">x</span><span class="p">)))</span>
<span class="gp">... </span><span class="p">]</span>
<span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">random_arrays</span><span class="p">((</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">))</span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">act_type</span><span class="p">,</span> <span class="n">numpy_impl</span> <span class="ow">in</span> <span class="n">test_suites</span><span class="p">:</span>
<span class="gp">... </span><span class="n">op</span> <span class="o">=</span> <span class="n">Activation</span><span class="p">(</span><span class="n">act_type</span><span class="o">=</span><span class="n">act_type</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'act'</span><span class="p">)</span>
<span class="gp">... </span><span class="n">y</span> <span class="o">=</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">simple_forward</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">act_data</span><span class="o">=</span><span class="n">x</span><span class="p">)</span>
<span class="gp">... </span><span class="n">y_np</span> <span class="o">=</span> <span class="n">numpy_impl</span><span class="p">(</span><span class="n">x</span><span class="p">)</span>
<span class="gp">... </span><span class="k">print</span><span class="p">(</span><span class="s1">'</span><span class="si">%s</span><span class="s1">: </span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">act_type</span><span class="p">,</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">almost_equal</span><span class="p">(</span><span class="n">y</span><span class="p">,</span> <span class="n">y_np</span><span class="p">)))</span>
<span class="go">relu: True</span>
<span class="go">sigmoid: True</span>
<span class="go">tanh: True</span>
<span class="go">softrelu: True</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.BatchNorm">
<code class="descclassname">mxnet.symbol.</code><code class="descname">BatchNorm</code><span class="sig-paren">(</span><em>data=None</em>, <em>gamma=None</em>, <em>beta=None</em>, <em>moving_mean=None</em>, <em>moving_var=None</em>, <em>eps=_Null</em>, <em>momentum=_Null</em>, <em>fix_gamma=_Null</em>, <em>use_global_stats=_Null</em>, <em>output_mean_var=_Null</em>, <em>axis=_Null</em>, <em>cudnn_off=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.BatchNorm" title="Permalink to this definition"></a></dt>
<dd><p>Batch normalization.</p>
<p>Normalizes a data batch by mean and variance, and applies a scale <code class="docutils literal"><span class="pre">gamma</span></code> as
well as offset <code class="docutils literal"><span class="pre">beta</span></code>.</p>
<p>Assume the input has more than one dimension and we normalize along axis 1.
We first compute the mean and variance along this axis:</p>
<div class="math">
\[\begin{split}data\_mean[i] = mean(data[:,i,:,...]) \\
data\_var[i] = var(data[:,i,:,...])\end{split}\]</div>
<p>Then compute the normalized output, which has the same shape as input, as following:</p>
<div class="math">
\[out[:,i,:,...] = \frac{data[:,i,:,...] - data\_mean[i]}{\sqrt{data\_var[i]+\epsilon}} * gamma[i] + beta[i]\]</div>
<p>Both <em>mean</em> and <em>var</em> returns a scalar by treating the input as a vector.</p>
<p>Assume the input has size <em>k</em> on axis 1, then both <code class="docutils literal"><span class="pre">gamma</span></code> and <code class="docutils literal"><span class="pre">beta</span></code>
have shape <em>(k,)</em>. If <code class="docutils literal"><span class="pre">output_mean_var</span></code> is set to be true, then outputs both <code class="docutils literal"><span class="pre">data_mean</span></code> and
<code class="docutils literal"><span class="pre">data_var</span></code> as well, which are needed for the backward pass.</p>
<p>Besides the inputs and the outputs, this operator accepts two auxiliary
states, <code class="docutils literal"><span class="pre">moving_mean</span></code> and <code class="docutils literal"><span class="pre">moving_var</span></code>, which are <em>k</em>-length
vectors. They are global statistics for the whole dataset, which are updated
by:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">moving_mean</span> <span class="o">=</span> <span class="n">moving_mean</span> <span class="o">*</span> <span class="n">momentum</span> <span class="o">+</span> <span class="n">data_mean</span> <span class="o">*</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">momentum</span><span class="p">)</span>
<span class="n">moving_var</span> <span class="o">=</span> <span class="n">moving_var</span> <span class="o">*</span> <span class="n">momentum</span> <span class="o">+</span> <span class="n">data_var</span> <span class="o">*</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">momentum</span><span class="p">)</span>
</pre></div>
</div>
<p>If <code class="docutils literal"><span class="pre">use_global_stats</span></code> is set to be true, then <code class="docutils literal"><span class="pre">moving_mean</span></code> and
<code class="docutils literal"><span class="pre">moving_var</span></code> are used instead of <code class="docutils literal"><span class="pre">data_mean</span></code> and <code class="docutils literal"><span class="pre">data_var</span></code> to compute
the output. It is often used during inference.</p>
<p>The parameter <code class="docutils literal"><span class="pre">axis</span></code> specifies which axis of the input shape denotes
the ‘channel’ (separately normalized groups). The default is 1. Specifying -1 sets the channel
axis to be the last item in the input shape.</p>
<p>Both <code class="docutils literal"><span class="pre">gamma</span></code> and <code class="docutils literal"><span class="pre">beta</span></code> are learnable parameters. But if <code class="docutils literal"><span class="pre">fix_gamma</span></code> is true,
then set <code class="docutils literal"><span class="pre">gamma</span></code> to 1 and its gradient to 0.</p>
<p>Defined in src/operator/nn/batch_norm.cc:L534</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to batch normalization</li>
<li><strong>gamma</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – gamma array</li>
<li><strong>beta</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – beta array</li>
<li><strong>moving_mean</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – running mean of input</li>
<li><strong>moving_var</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – running variance of input</li>
<li><strong>eps</strong> (<em>double, optional, default=0.001</em>) – Epsilon to prevent div 0. Must be no less than CUDNN_BN_MIN_EPSILON defined in cudnn.h when using cudnn (usually 1e-5)</li>
<li><strong>momentum</strong> (<em>float, optional, default=0.9</em>) – Momentum for moving average</li>
<li><strong>fix_gamma</strong> (<em>boolean, optional, default=1</em>) – Fix gamma while training</li>
<li><strong>use_global_stats</strong> (<em>boolean, optional, default=0</em>) – Whether use global moving statistics instead of local batch-norm. This will force change batch-norm into a scale shift operator.</li>
<li><strong>output_mean_var</strong> (<em>boolean, optional, default=0</em>) – Output All,normal mean and var</li>
<li><strong>axis</strong> (<em>int, optional, default='1'</em>) – Specify which shape axis the channel is specified</li>
<li><strong>cudnn_off</strong> (<em>boolean, optional, default=0</em>) – Do not select CUDNN operator, if available</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.BatchNorm_v1">
<code class="descclassname">mxnet.symbol.</code><code class="descname">BatchNorm_v1</code><span class="sig-paren">(</span><em>data=None</em>, <em>gamma=None</em>, <em>beta=None</em>, <em>eps=_Null</em>, <em>momentum=_Null</em>, <em>fix_gamma=_Null</em>, <em>use_global_stats=_Null</em>, <em>output_mean_var=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.BatchNorm_v1" title="Permalink to this definition"></a></dt>
<dd><p>Batch normalization.</p>
<p>Normalizes a data batch by mean and variance, and applies a scale <code class="docutils literal"><span class="pre">gamma</span></code> as
well as offset <code class="docutils literal"><span class="pre">beta</span></code>.</p>
<p>Assume the input has more than one dimension and we normalize along axis 1.
We first compute the mean and variance along this axis:</p>
<div class="math">
\[\begin{split}data\_mean[i] = mean(data[:,i,:,...]) \\
data\_var[i] = var(data[:,i,:,...])\end{split}\]</div>
<p>Then compute the normalized output, which has the same shape as input, as following:</p>
<div class="math">
\[out[:,i,:,...] = \frac{data[:,i,:,...] - data\_mean[i]}{\sqrt{data\_var[i]+\epsilon}} * gamma[i] + beta[i]\]</div>
<p>Both <em>mean</em> and <em>var</em> returns a scalar by treating the input as a vector.</p>
<p>Assume the input has size <em>k</em> on axis 1, then both <code class="docutils literal"><span class="pre">gamma</span></code> and <code class="docutils literal"><span class="pre">beta</span></code>
have shape <em>(k,)</em>. If <code class="docutils literal"><span class="pre">output_mean_var</span></code> is set to be true, then outputs both <code class="docutils literal"><span class="pre">data_mean</span></code> and
<code class="docutils literal"><span class="pre">data_var</span></code> as well, which are needed for the backward pass.</p>
<p>Besides the inputs and the outputs, this operator accepts two auxiliary
states, <code class="docutils literal"><span class="pre">moving_mean</span></code> and <code class="docutils literal"><span class="pre">moving_var</span></code>, which are <em>k</em>-length
vectors. They are global statistics for the whole dataset, which are updated
by:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">moving_mean</span> <span class="o">=</span> <span class="n">moving_mean</span> <span class="o">*</span> <span class="n">momentum</span> <span class="o">+</span> <span class="n">data_mean</span> <span class="o">*</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">momentum</span><span class="p">)</span>
<span class="n">moving_var</span> <span class="o">=</span> <span class="n">moving_var</span> <span class="o">*</span> <span class="n">momentum</span> <span class="o">+</span> <span class="n">data_var</span> <span class="o">*</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">momentum</span><span class="p">)</span>
</pre></div>
</div>
<p>If <code class="docutils literal"><span class="pre">use_global_stats</span></code> is set to be true, then <code class="docutils literal"><span class="pre">moving_mean</span></code> and
<code class="docutils literal"><span class="pre">moving_var</span></code> are used instead of <code class="docutils literal"><span class="pre">data_mean</span></code> and <code class="docutils literal"><span class="pre">data_var</span></code> to compute
the output. It is often used during inference.</p>
<p>Both <code class="docutils literal"><span class="pre">gamma</span></code> and <code class="docutils literal"><span class="pre">beta</span></code> are learnable parameters. But if <code class="docutils literal"><span class="pre">fix_gamma</span></code> is true,
then set <code class="docutils literal"><span class="pre">gamma</span></code> to 1 and its gradient to 0.</p>
<p>Defined in src/operator/batch_norm_v1.cc:L90</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to batch normalization</li>
<li><strong>gamma</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – gamma array</li>
<li><strong>beta</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – beta array</li>
<li><strong>eps</strong> (<em>float, optional, default=0.001</em>) – Epsilon to prevent div 0</li>
<li><strong>momentum</strong> (<em>float, optional, default=0.9</em>) – Momentum for moving average</li>
<li><strong>fix_gamma</strong> (<em>boolean, optional, default=1</em>) – Fix gamma while training</li>
<li><strong>use_global_stats</strong> (<em>boolean, optional, default=0</em>) – Whether use global moving statistics instead of local batch-norm. This will force change batch-norm into a scale shift operator.</li>
<li><strong>output_mean_var</strong> (<em>boolean, optional, default=0</em>) – Output All,normal mean and var</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.BilinearSampler">
<code class="descclassname">mxnet.symbol.</code><code class="descname">BilinearSampler</code><span class="sig-paren">(</span><em>data=None</em>, <em>grid=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.BilinearSampler" title="Permalink to this definition"></a></dt>
<dd><p>Applies bilinear sampling to input feature map.</p>
<p>Bilinear Sampling is the key of [NIPS2015] “Spatial Transformer Networks”. The usage of the operator is very similar to remap function in OpenCV,
except that the operator has the backward pass.</p>
<p>Given <span class="math">\(data\)</span> and <span class="math">\(grid\)</span>, then the output is computed by</p>
<div class="math">
\[\begin{split}x_{src} = grid[batch, 0, y_{dst}, x_{dst}] \\
y_{src} = grid[batch, 1, y_{dst}, x_{dst}] \\
output[batch, channel, y_{dst}, x_{dst}] = G(data[batch, channel, y_{src}, x_{src})\end{split}\]</div>
<p><span class="math">\(x_{dst}\)</span>, <span class="math">\(y_{dst}\)</span> enumerate all spatial locations in <span class="math">\(output\)</span>, and <span class="math">\(G()\)</span> denotes the bilinear interpolation kernel.
The out-boundary points will be padded with zeros.The shape of the output will be (data.shape[0], data.shape[1], grid.shape[2], grid.shape[3]).</p>
<p>The operator assumes that <span class="math">\(data\)</span> has ‘NCHW’ layout and <span class="math">\(grid\)</span> has been normalized to [-1, 1].</p>
<p>BilinearSampler often cooperates with GridGenerator which generates sampling grids for BilinearSampler.
GridGenerator supports two kinds of transformation: <code class="docutils literal"><span class="pre">affine</span></code> and <code class="docutils literal"><span class="pre">warp</span></code>.
If users want to design a CustomOp to manipulate <span class="math">\(grid\)</span>, please firstly refer to the code of GridGenerator.</p>
<p>Example 1:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>## Zoom out data two times
data = array([[[[1, 4, 3, 6],
[1, 8, 8, 9],
[0, 4, 1, 5],
[1, 0, 1, 3]]]])
affine_matrix = array([[2, 0, 0],
[0, 2, 0]])
affine_matrix = reshape(affine_matrix, shape=(1, 6))
grid = GridGenerator(data=affine_matrix, transform_type='affine', target_shape=(4, 4))
out = BilinearSampler(data, grid)
out
[[[[ 0, 0, 0, 0],
[ 0, 3.5, 6.5, 0],
[ 0, 1.25, 2.5, 0],
[ 0, 0, 0, 0]]]
</pre></div>
</div>
<p>Example 2:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>## shift data horizontally by -1 pixel
data = array([[[[1, 4, 3, 6],
[1, 8, 8, 9],
[0, 4, 1, 5],
[1, 0, 1, 3]]]])
warp_maxtrix = array([[[[1, 1, 1, 1],
[1, 1, 1, 1],
[1, 1, 1, 1],
[1, 1, 1, 1]],
[[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]]]])
grid = GridGenerator(data=warp_matrix, transform_type='warp')
out = BilinearSampler(data, grid)
out
[[[[ 4, 3, 6, 0],
[ 8, 8, 9, 0],
[ 4, 1, 5, 0],
[ 0, 1, 3, 0]]]
</pre></div>
</div>
<p>Defined in src/operator/bilinear_sampler.cc:L245</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to the BilinearsamplerOp.</li>
<li><strong>grid</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input grid to the BilinearsamplerOp.grid has two channels: x_src, y_src</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.BlockGrad">
<code class="descclassname">mxnet.symbol.</code><code class="descname">BlockGrad</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.BlockGrad" title="Permalink to this definition"></a></dt>
<dd><p>Stops gradient computation.</p>
<p>Stops the accumulated gradient of the inputs from flowing through this operator
in the backward direction. In other words, this operator prevents the contribution
of its inputs to be taken into account for computing gradients.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>v1 = [1, 2]
v2 = [0, 1]
a = Variable('a')
b = Variable('b')
b_stop_grad = stop_gradient(3 * b)
loss = MakeLoss(b_stop_grad + a)
executor = loss.simple_bind(ctx=cpu(), a=(1,2), b=(1,2))
executor.forward(is_train=True, a=v1, b=v2)
executor.outputs
[ 1. 5.]
executor.backward()
executor.grad_arrays
[ 0. 0.]
[ 1. 1.]
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L241</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Cast">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Cast</code><span class="sig-paren">(</span><em>data=None</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Cast" title="Permalink to this definition"></a></dt>
<dd><p>Casts all elements of the input to a new type.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">Cast</span></code> is deprecated. Use <code class="docutils literal"><span class="pre">cast</span></code> instead.</p>
</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">cast</span><span class="p">([</span><span class="mf">0.9</span><span class="p">,</span> <span class="mf">1.3</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s1">'int32'</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span>
<span class="n">cast</span><span class="p">([</span><span class="mf">1e20</span><span class="p">,</span> <span class="mf">11.1</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s1">'float16'</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="n">inf</span><span class="p">,</span> <span class="mf">11.09375</span><span class="p">]</span>
<span class="n">cast</span><span class="p">([</span><span class="mi">300</span><span class="p">,</span> <span class="mf">11.1</span><span class="p">,</span> <span class="mf">10.9</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">3</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s1">'uint8'</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="mi">44</span><span class="p">,</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">255</span><span class="p">,</span> <span class="mi">253</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L385</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input.</li>
<li><strong>dtype</strong> (<em>{'float16', 'float32', 'float64', 'int32', 'int64', 'int8', 'uint8'}, required</em>) – Output data type.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Concat">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Concat</code><span class="sig-paren">(</span><em>*data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Concat" title="Permalink to this definition"></a></dt>
<dd><p>Joins input arrays along a given axis.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>Concat</cite> is deprecated. Use <cite>concat</cite> instead.</p>
</div>
<p>The dimensions of the input arrays should be the same except the axis along
which they will be concatenated.
The dimension of the output array along the concatenated axis will be equal
to the sum of the corresponding dimensions of the input arrays.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[1,1],[2,2]]
y = [[3,3],[4,4],[5,5]]
z = [[6,6], [7,7],[8,8]]
concat(x,y,z,dim=0) = [[ 1., 1.],
[ 2., 2.],
[ 3., 3.],
[ 4., 4.],
[ 5., 5.],
[ 6., 6.],
[ 7., 7.],
[ 8., 8.]]
Note that you cannot concat x,y,z along dimension 1 since dimension
0 is not the same for all the input arrays.
concat(y,z,dim=1) = [[ 3., 3., 6., 6.],
[ 4., 4., 7., 7.],
[ 5., 5., 8., 8.]]
</pre></div>
</div>
<p>Defined in src/operator/nn/concat.cc:L235
This function support variable length of positional input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<em>Symbol[]</em>) – List of arrays to concatenate</li>
<li><strong>dim</strong> (<em>int, optional, default='1'</em>) – the dimension to be concated.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<p>Concat two (or more) inputs along a specific dimension:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">Variable</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">Variable</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">Concat</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">dim</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'my-concat'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span>
<span class="go"><Symbol my-concat></span>
<span class="gp">>>> </span><span class="n">SymbolDoc</span><span class="o">.</span><span class="n">get_output_shape</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">a</span><span class="o">=</span><span class="p">(</span><span class="mi">128</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">b</span><span class="o">=</span><span class="p">(</span><span class="mi">128</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>
<span class="go">{'my-concat_output': (128L, 25L, 3L, 3L)}</span>
</pre></div>
</div>
<p>Note the shape should be the same except on the dimension that is being
concatenated.</p>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Convolution">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Convolution</code><span class="sig-paren">(</span><em>data=None</em>, <em>weight=None</em>, <em>bias=None</em>, <em>kernel=_Null</em>, <em>stride=_Null</em>, <em>dilate=_Null</em>, <em>pad=_Null</em>, <em>num_filter=_Null</em>, <em>num_group=_Null</em>, <em>workspace=_Null</em>, <em>no_bias=_Null</em>, <em>cudnn_tune=_Null</em>, <em>cudnn_off=_Null</em>, <em>layout=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Convolution" title="Permalink to this definition"></a></dt>
<dd><p>Compute <em>N</em>-D convolution on <em>(N+2)</em>-D input.</p>
<p>In the 2-D convolution, given input data with shape <em>(batch_size,
channel, height, width)</em>, the output is computed by</p>
<div class="math">
\[out[n,i,:,:] = bias[i] + \sum_{j=0}^{channel} data[n,j,:,:] \star
weight[i,j,:,:]\]</div>
<p>where <span class="math">\(\star\)</span> is the 2-D cross-correlation operator.</p>
<p>For general 2-D convolution, the shapes are</p>
<ul class="simple">
<li><strong>data</strong>: <em>(batch_size, channel, height, width)</em></li>
<li><strong>weight</strong>: <em>(num_filter, channel, kernel[0], kernel[1])</em></li>
<li><strong>bias</strong>: <em>(num_filter,)</em></li>
<li><strong>out</strong>: <em>(batch_size, num_filter, out_height, out_width)</em>.</li>
</ul>
<p>Define:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">f</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">k</span><span class="p">,</span><span class="n">p</span><span class="p">,</span><span class="n">s</span><span class="p">,</span><span class="n">d</span><span class="p">)</span> <span class="o">=</span> <span class="n">floor</span><span class="p">((</span><span class="n">x</span><span class="o">+</span><span class="mi">2</span><span class="o">*</span><span class="n">p</span><span class="o">-</span><span class="n">d</span><span class="o">*</span><span class="p">(</span><span class="n">k</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">/</span><span class="n">s</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span>
</pre></div>
</div>
<p>then we have:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">out_height</span><span class="o">=</span><span class="n">f</span><span class="p">(</span><span class="n">height</span><span class="p">,</span> <span class="n">kernel</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">pad</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">stride</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">dilate</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">out_width</span><span class="o">=</span><span class="n">f</span><span class="p">(</span><span class="n">width</span><span class="p">,</span> <span class="n">kernel</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">pad</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">stride</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">dilate</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
</pre></div>
</div>
<p>If <code class="docutils literal"><span class="pre">no_bias</span></code> is set to be true, then the <code class="docutils literal"><span class="pre">bias</span></code> term is ignored.</p>
<p>The default data <code class="docutils literal"><span class="pre">layout</span></code> is <em>NCHW</em>, namely <em>(batch_size, channel, height,
width)</em>. We can choose other layouts such as <em>NHWC</em>.</p>
<p>If <code class="docutils literal"><span class="pre">num_group</span></code> is larger than 1, denoted by <em>g</em>, then split the input <code class="docutils literal"><span class="pre">data</span></code>
evenly into <em>g</em> parts along the channel axis, and also evenly split <code class="docutils literal"><span class="pre">weight</span></code>
along the first dimension. Next compute the convolution on the <em>i</em>-th part of
the data with the <em>i</em>-th weight part. The output is obtained by concatenating all
the <em>g</em> results.</p>
<p>1-D convolution does not have <em>height</em> dimension but only <em>width</em> in space.</p>
<ul class="simple">
<li><strong>data</strong>: <em>(batch_size, channel, width)</em></li>
<li><strong>weight</strong>: <em>(num_filter, channel, kernel[0])</em></li>
<li><strong>bias</strong>: <em>(num_filter,)</em></li>
<li><strong>out</strong>: <em>(batch_size, num_filter, out_width)</em>.</li>
</ul>
<p>3-D convolution adds an additional <em>depth</em> dimension besides <em>height</em> and
<em>width</em>. The shapes are</p>
<ul class="simple">
<li><strong>data</strong>: <em>(batch_size, channel, depth, height, width)</em></li>
<li><strong>weight</strong>: <em>(num_filter, channel, kernel[0], kernel[1], kernel[2])</em></li>
<li><strong>bias</strong>: <em>(num_filter,)</em></li>
<li><strong>out</strong>: <em>(batch_size, num_filter, out_depth, out_height, out_width)</em>.</li>
</ul>
<p>Both <code class="docutils literal"><span class="pre">weight</span></code> and <code class="docutils literal"><span class="pre">bias</span></code> are learnable parameters.</p>
<p>There are other options to tune the performance.</p>
<ul class="simple">
<li><strong>cudnn_tune</strong>: enable this option leads to higher startup time but may give
faster speed. Options are<ul>
<li><strong>off</strong>: no tuning</li>
<li><strong>limited_workspace</strong>:run test and pick the fastest algorithm that doesn’t
exceed workspace limit.</li>
<li><strong>fastest</strong>: pick the fastest algorithm and ignore workspace limit.</li>
<li><strong>None</strong> (default): the behavior is determined by environment variable
<code class="docutils literal"><span class="pre">MXNET_CUDNN_AUTOTUNE_DEFAULT</span></code>. 0 for off, 1 for limited workspace
(default), 2 for fastest.</li>
</ul>
</li>
<li><strong>workspace</strong>: A large number leads to more (GPU) memory usage but may improve
the performance.</li>
</ul>
<p>Defined in src/operator/nn/convolution.cc:L456</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to the ConvolutionOp.</li>
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight matrix.</li>
<li><strong>bias</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Bias parameter.</li>
<li><strong>kernel</strong> (<em>Shape(tuple), required</em>) – Convolution kernel size: (w,), (h, w) or (d, h, w)</li>
<li><strong>stride</strong> (<em>Shape(tuple), optional, default=[]</em>) – Convolution stride: (w,), (h, w) or (d, h, w). Defaults to 1 for each dimension.</li>
<li><strong>dilate</strong> (<em>Shape(tuple), optional, default=[]</em>) – Convolution dilate: (w,), (h, w) or (d, h, w). Defaults to 1 for each dimension.</li>
<li><strong>pad</strong> (<em>Shape(tuple), optional, default=[]</em>) – Zero pad for convolution: (w,), (h, w) or (d, h, w). Defaults to no padding.</li>
<li><strong>num_filter</strong> (<em>int (non-negative), required</em>) – Convolution filter(channel) number</li>
<li><strong>num_group</strong> (<em>int (non-negative), optional, default=1</em>) – Number of group partitions.</li>
<li><strong>workspace</strong> (<em>long (non-negative), optional, default=1024</em>) – Maximum temporary workspace allowed for convolution (MB).</li>
<li><strong>no_bias</strong> (<em>boolean, optional, default=0</em>) – Whether to disable bias parameter.</li>
<li><strong>cudnn_tune</strong> (<em>{None, 'fastest', 'limited_workspace', 'off'},optional, default='None'</em>) – Whether to pick convolution algo by running performance test.</li>
<li><strong>cudnn_off</strong> (<em>boolean, optional, default=0</em>) – Turn off cudnn for this layer.</li>
<li><strong>layout</strong> (<em>{None, 'NCDHW', 'NCHW', 'NCW', 'NDHWC', 'NHWC'},optional, default='None'</em>) – Set layout for input, output and weight. Empty for
default layout: NCW for 1d, NCHW for 2d and NCDHW for 3d.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Convolution_v1">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Convolution_v1</code><span class="sig-paren">(</span><em>data=None</em>, <em>weight=None</em>, <em>bias=None</em>, <em>kernel=_Null</em>, <em>stride=_Null</em>, <em>dilate=_Null</em>, <em>pad=_Null</em>, <em>num_filter=_Null</em>, <em>num_group=_Null</em>, <em>workspace=_Null</em>, <em>no_bias=_Null</em>, <em>cudnn_tune=_Null</em>, <em>cudnn_off=_Null</em>, <em>layout=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Convolution_v1" title="Permalink to this definition"></a></dt>
<dd><p>This operator is DEPRECATED. Apply convolution to input then add a bias.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to the ConvolutionV1Op.</li>
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight matrix.</li>
<li><strong>bias</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Bias parameter.</li>
<li><strong>kernel</strong> (<em>Shape(tuple), required</em>) – convolution kernel size: (h, w) or (d, h, w)</li>
<li><strong>stride</strong> (<em>Shape(tuple), optional, default=[]</em>) – convolution stride: (h, w) or (d, h, w)</li>
<li><strong>dilate</strong> (<em>Shape(tuple), optional, default=[]</em>) – convolution dilate: (h, w) or (d, h, w)</li>
<li><strong>pad</strong> (<em>Shape(tuple), optional, default=[]</em>) – pad for convolution: (h, w) or (d, h, w)</li>
<li><strong>num_filter</strong> (<em>int (non-negative), required</em>) – convolution filter(channel) number</li>
<li><strong>num_group</strong> (<em>int (non-negative), optional, default=1</em>) – Number of group partitions. Equivalent to slicing input into num_group
partitions, apply convolution on each, then concatenate the results</li>
<li><strong>workspace</strong> (<em>long (non-negative), optional, default=1024</em>) – Maximum tmp workspace allowed for convolution (MB).</li>
<li><strong>no_bias</strong> (<em>boolean, optional, default=0</em>) – Whether to disable bias parameter.</li>
<li><strong>cudnn_tune</strong> (<em>{None, 'fastest', 'limited_workspace', 'off'},optional, default='None'</em>) – Whether to pick convolution algo by running performance test.
Leads to higher startup time but may give faster speed. Options are:
‘off’: no tuning
‘limited_workspace’: run test and pick the fastest algorithm that doesn’t exceed workspace limit.
‘fastest’: pick the fastest algorithm and ignore workspace limit.
If set to None (default), behavior is determined by environment
variable MXNET_CUDNN_AUTOTUNE_DEFAULT: 0 for off,
1 for limited workspace (default), 2 for fastest.</li>
<li><strong>cudnn_off</strong> (<em>boolean, optional, default=0</em>) – Turn off cudnn for this layer.</li>
<li><strong>layout</strong> (<em>{None, 'NCDHW', 'NCHW', 'NDHWC', 'NHWC'},optional, default='None'</em>) – Set layout for input, output and weight. Empty for
default layout: NCHW for 2d and NCDHW for 3d.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Correlation">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Correlation</code><span class="sig-paren">(</span><em>data1=None</em>, <em>data2=None</em>, <em>kernel_size=_Null</em>, <em>max_displacement=_Null</em>, <em>stride1=_Null</em>, <em>stride2=_Null</em>, <em>pad_size=_Null</em>, <em>is_multiply=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Correlation" title="Permalink to this definition"></a></dt>
<dd><p>Applies correlation to inputs.</p>
<p>The correlation layer performs multiplicative patch comparisons between two feature maps.</p>
<p>Given two multi-channel feature maps <span class="math">\(f_{1}, f_{2}\)</span>, with <span class="math">\(w\)</span>, <span class="math">\(h\)</span>, and <span class="math">\(c\)</span> being their width, height, and number of channels,
the correlation layer lets the network compare each patch from <span class="math">\(f_{1}\)</span> with each patch from <span class="math">\(f_{2}\)</span>.</p>
<p>For now we consider only a single comparison of two patches. The ‘correlation’ of two patches centered at <span class="math">\(x_{1}\)</span> in the first map and
<span class="math">\(x_{2}\)</span> in the second map is then defined as:</p>
<div class="math">
\[\begin{split}c(x_{1}, x_{2}) = \sum_{o \in [-k,k] \times [-k,k]} <f_{1}(x_{1} + o), f_{2}(x_{2} + o)>\end{split}\]</div>
<p>for a square patch of size <span class="math">\(K:=2k+1\)</span>.</p>
<p>Note that the equation above is identical to one step of a convolution in neural networks, but instead of convolving data with a filter, it convolves data with other
data. For this reason, it has no training weights.</p>
<p>Computing <span class="math">\(c(x_{1}, x_{2})\)</span> involves <span class="math">\(c * K^{2}\)</span> multiplications. Comparing all patch combinations involves <span class="math">\(w^{2}*h^{2}\)</span> such computations.</p>
<p>Given a maximum displacement <span class="math">\(d\)</span>, for each location <span class="math">\(x_{1}\)</span> it computes correlations <span class="math">\(c(x_{1}, x_{2})\)</span> only in a neighborhood of size <span class="math">\(D:=2d+1\)</span>,
by limiting the range of <span class="math">\(x_{2}\)</span>. We use strides <span class="math">\(s_{1}, s_{2}\)</span>, to quantize <span class="math">\(x_{1}\)</span> globally and to quantize <span class="math">\(x_{2}\)</span> within the neighborhood
centered around <span class="math">\(x_{1}\)</span>.</p>
<p>The final output is defined by the following expression:</p>
<div class="math">
\[out[n, q, i, j] = c(x_{i, j}, x_{q})\]</div>
<p>where <span class="math">\(i\)</span> and <span class="math">\(j\)</span> enumerate spatial locations in <span class="math">\(f_{1}\)</span>, and <span class="math">\(q\)</span> denotes the <span class="math">\(q^{th}\)</span> neighborhood of <span class="math">\(x_{i,j}\)</span>.</p>
<p>Defined in src/operator/correlation.cc:L192</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data1</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data1 to the correlation.</li>
<li><strong>data2</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data2 to the correlation.</li>
<li><strong>kernel_size</strong> (<em>int (non-negative), optional, default=1</em>) – kernel size for Correlation must be an odd number</li>
<li><strong>max_displacement</strong> (<em>int (non-negative), optional, default=1</em>) – Max displacement of Correlation</li>
<li><strong>stride1</strong> (<em>int (non-negative), optional, default=1</em>) – stride1 quantize data1 globally</li>
<li><strong>stride2</strong> (<em>int (non-negative), optional, default=1</em>) – stride2 quantize data2 within the neighborhood centered around data1</li>
<li><strong>pad_size</strong> (<em>int (non-negative), optional, default=0</em>) – pad for Correlation</li>
<li><strong>is_multiply</strong> (<em>boolean, optional, default=1</em>) – operation type is either multiplication or subduction</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Crop">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Crop</code><span class="sig-paren">(</span><em>*data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Crop" title="Permalink to this definition"></a></dt>
<dd><div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>Crop</cite> is deprecated. Use <cite>slice</cite> instead.</p>
</div>
<p>Crop the 2nd and 3rd dim of input data, with the corresponding size of h_w or
with width and height of the second input symbol, i.e., with one input, we need h_w to
specify the crop height and width, otherwise the second input symbol’s size will be used</p>
<p>Defined in src/operator/crop.cc:L50
This function support variable length of positional input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<em>Symbol or Symbol[]</em>) – Tensor or List of Tensors, the second input will be used as crop_like shape reference</li>
<li><strong>offset</strong> (<em>Shape(tuple), optional, default=[0,0]</em>) – crop offset coordinate: (y, x)</li>
<li><strong>h_w</strong> (<em>Shape(tuple), optional, default=[0,0]</em>) – crop height and width: (h, w)</li>
<li><strong>center_crop</strong> (<em>boolean, optional, default=0</em>) – If set to true, then it will use be the center_crop,or it will crop using the shape of crop_like</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Custom">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Custom</code><span class="sig-paren">(</span><em>*data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Custom" title="Permalink to this definition"></a></dt>
<dd><p>Apply a custom operator implemented in a frontend language (like Python).</p>
<p>Custom operators should override required methods like <cite>forward</cite> and <cite>backward</cite>.
The custom operator must be registered before it can be used.
Please check the tutorial here: <a class="reference external" href="https://mxnet.incubator.apache.org/faq/new_op.html">https://mxnet.incubator.apache.org/faq/new_op.html</a>.</p>
<p>Defined in src/operator/custom/custom.cc:L369</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<em>Symbol[]</em>) – Input data for the custom operator.</li>
<li><strong>op_type</strong> (<em>string</em>) – Name of the custom operator. This is the name that is passed to <cite>mx.operator.register</cite> to register the operator.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Deconvolution">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Deconvolution</code><span class="sig-paren">(</span><em>data=None</em>, <em>weight=None</em>, <em>bias=None</em>, <em>kernel=_Null</em>, <em>stride=_Null</em>, <em>dilate=_Null</em>, <em>pad=_Null</em>, <em>adj=_Null</em>, <em>target_shape=_Null</em>, <em>num_filter=_Null</em>, <em>num_group=_Null</em>, <em>workspace=_Null</em>, <em>no_bias=_Null</em>, <em>cudnn_tune=_Null</em>, <em>cudnn_off=_Null</em>, <em>layout=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Deconvolution" title="Permalink to this definition"></a></dt>
<dd><p>Computes 1D or 2D transposed convolution (aka fractionally strided convolution) of the input tensor. This operation can be seen as the gradient of Convolution operation with respect to its input. Convolution usually reduces the size of the input. Transposed convolution works the other way, going from a smaller input to a larger output while preserving the connectivity pattern.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input tensor to the deconvolution operation.</li>
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weights representing the kernel.</li>
<li><strong>bias</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Bias added to the result after the deconvolution operation.</li>
<li><strong>kernel</strong> (<em>Shape(tuple), required</em>) – Deconvolution kernel size: (w,), (h, w) or (d, h, w). This is same as the kernel size used for the corresponding convolution</li>
<li><strong>stride</strong> (<em>Shape(tuple), optional, default=[]</em>) – The stride used for the corresponding convolution: (w,), (h, w) or (d, h, w). Defaults to 1 for each dimension.</li>
<li><strong>dilate</strong> (<em>Shape(tuple), optional, default=[]</em>) – Dilation factor for each dimension of the input: (w,), (h, w) or (d, h, w). Defaults to 1 for each dimension.</li>
<li><strong>pad</strong> (<em>Shape(tuple), optional, default=[]</em>) – The amount of implicit zero padding added during convolution for each dimension of the input: (w,), (h, w) or (d, h, w). <code class="docutils literal"><span class="pre">(kernel-1)/2</span></code> is usually a good choice. If <cite>target_shape</cite> is set, <cite>pad</cite> will be ignored and a padding that will generate the target shape will be used. Defaults to no padding.</li>
<li><strong>adj</strong> (<em>Shape(tuple), optional, default=[]</em>) – Adjustment for output shape: (w,), (h, w) or (d, h, w). If <cite>target_shape</cite> is set, <cite>adj</cite> will be ignored and computed accordingly.</li>
<li><strong>target_shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape of the output tensor: (w,), (h, w) or (d, h, w).</li>
<li><strong>num_filter</strong> (<em>int (non-negative), required</em>) – Number of output filters.</li>
<li><strong>num_group</strong> (<em>int (non-negative), optional, default=1</em>) – Number of groups partition.</li>
<li><strong>workspace</strong> (<em>long (non-negative), optional, default=512</em>) – Maximum temporal workspace allowed for deconvolution (MB).</li>
<li><strong>no_bias</strong> (<em>boolean, optional, default=1</em>) – Whether to disable bias parameter.</li>
<li><strong>cudnn_tune</strong> (<em>{None, 'fastest', 'limited_workspace', 'off'},optional, default='None'</em>) – Whether to pick convolution algorithm by running performance test.</li>
<li><strong>cudnn_off</strong> (<em>boolean, optional, default=0</em>) – Turn off cudnn for this layer.</li>
<li><strong>layout</strong> (<em>{None, 'NCDHW', 'NCHW', 'NCW', 'NDHWC', 'NHWC'},optional, default='None'</em>) – Set layout for input, output and weight. Empty for default layout, NCW for 1d, NCHW for 2d and NCDHW for 3d.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Dropout">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Dropout</code><span class="sig-paren">(</span><em>data=None</em>, <em>p=_Null</em>, <em>mode=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Dropout" title="Permalink to this definition"></a></dt>
<dd><p>Applies dropout operation to input array.</p>
<ul class="simple">
<li>During training, each element of the input is set to zero with probability p.
The whole array is rescaled by <span class="math">\(1/(1-p)\)</span> to keep the expected
sum of the input unchanged.</li>
<li>During testing, this operator does not change the input if mode is ‘training’.
If mode is ‘always’, the same computaion as during training will be applied.</li>
</ul>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>random.seed(998)
input_array = array([[3., 0.5, -0.5, 2., 7.],
[2., -0.4, 7., 3., 0.2]])
a = symbol.Variable('a')
dropout = symbol.Dropout(a, p = 0.2)
executor = dropout.simple_bind(a = input_array.shape)
## If training
executor.forward(is_train = True, a = input_array)
executor.outputs
[[ 3.75 0.625 -0. 2.5 8.75 ]
[ 2.5 -0.5 8.75 3.75 0. ]]
## If testing
executor.forward(is_train = False, a = input_array)
executor.outputs
[[ 3. 0.5 -0.5 2. 7. ]
[ 2. -0.4 7. 3. 0.2 ]]
</pre></div>
</div>
<p>Defined in src/operator/nn/dropout.cc:L76</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input array to which dropout will be applied.</li>
<li><strong>p</strong> (<em>float, optional, default=0.5</em>) – Fraction of the input that gets dropped out during training time.</li>
<li><strong>mode</strong> (<em>{'always', 'training'},optional, default='training'</em>) – Whether to only turn on dropout during training or to also turn on for inference.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<p>Apply dropout to corrupt input as zero with probability 0.2:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">data_dp</span> <span class="o">=</span> <span class="n">Dropout</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="n">p</span><span class="o">=</span><span class="mf">0.2</span><span class="p">)</span>
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">shape</span> <span class="o">=</span> <span class="p">(</span><span class="mi">100</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span> <span class="c1"># take larger shapes to be more statistical stable</span>
<span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">(</span><span class="n">shape</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">op</span> <span class="o">=</span> <span class="n">Dropout</span><span class="p">(</span><span class="n">p</span><span class="o">=</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'dp'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="c1"># dropout is identity during testing</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">simple_forward</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">dp_data</span><span class="o">=</span><span class="n">x</span><span class="p">,</span> <span class="n">is_train</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">test_utils</span><span class="o">.</span><span class="n">almost_equal</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>
<span class="go">True</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">simple_forward</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">dp_data</span><span class="o">=</span><span class="n">x</span><span class="p">,</span> <span class="n">is_train</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="gp">>>> </span><span class="c1"># expectation is (approximately) unchanged</span>
<span class="gp">>>> </span><span class="n">np</span><span class="o">.</span><span class="n">abs</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">mean</span><span class="p">()</span> <span class="o">-</span> <span class="n">y</span><span class="o">.</span><span class="n">mean</span><span class="p">())</span> <span class="o"><</span> <span class="mf">0.1</span>
<span class="go">True</span>
<span class="gp">>>> </span><span class="nb">set</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">unique</span><span class="p">(</span><span class="n">y</span><span class="p">))</span> <span class="o">==</span> <span class="nb">set</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="p">])</span>
<span class="go">True</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.ElementWiseSum">
<code class="descclassname">mxnet.symbol.</code><code class="descname">ElementWiseSum</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.ElementWiseSum" title="Permalink to this definition"></a></dt>
<dd><p>Adds all input arguments element-wise.</p>
<div class="math">
\[add\_n(a_1, a_2, ..., a_n) = a_1 + a_2 + ... + a_n\]</div>
<p><code class="docutils literal"><span class="pre">add_n</span></code> is potentially more efficient than calling <code class="docutils literal"><span class="pre">add</span></code> by <cite>n</cite> times.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">add_n</span></code> output depends on storage types of inputs</p>
<ul class="simple">
<li>add_n(row_sparse, row_sparse, ..) = row_sparse</li>
<li>otherwise, <code class="docutils literal"><span class="pre">add_n</span></code> generates output with default storage</li>
</ul>
<p>Defined in src/operator/tensor/elemwise_sum.cc:L159
This function support variable length of positional input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>args</strong> (<em>Symbol[]</em>) – Positional input arguments</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Embedding">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Embedding</code><span class="sig-paren">(</span><em>data=None</em>, <em>weight=None</em>, <em>input_dim=_Null</em>, <em>output_dim=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Embedding" title="Permalink to this definition"></a></dt>
<dd><p>Maps integer indices to vector representations (embeddings).</p>
<p>This operator maps words to real-valued vectors in a high-dimensional space,
called word embeddings. These embeddings can capture semantic and syntactic properties of the words.
For example, it has been noted that in the learned embedding spaces, similar words tend
to be close to each other and dissimilar words far apart.</p>
<p>For an input array of shape (d1, ..., dK),
the shape of an output array is (d1, ..., dK, output_dim).
All the input values should be integers in the range [0, input_dim).</p>
<p>If the input_dim is ip0 and output_dim is op0, then shape of the embedding weight matrix must be
(ip0, op0).</p>
<p>By default, if any index mentioned is too large, it is replaced by the index that addresses
the last vector in an embedding matrix.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>input_dim = 4
output_dim = 5
// Each row in weight matrix y represents a word. So, y = (w0,w1,w2,w3)
y = [[ 0., 1., 2., 3., 4.],
[ 5., 6., 7., 8., 9.],
[ 10., 11., 12., 13., 14.],
[ 15., 16., 17., 18., 19.]]
// Input array x represents n-grams(2-gram). So, x = [(w1,w3), (w0,w2)]
x = [[ 1., 3.],
[ 0., 2.]]
// Mapped input x to its vector representation y.
Embedding(x, y, 4, 5) = [[[ 5., 6., 7., 8., 9.],
[ 15., 16., 17., 18., 19.]],
[[ 0., 1., 2., 3., 4.],
[ 10., 11., 12., 13., 14.]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/indexing_op.cc:L225</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array to the embedding operator.</li>
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The embedding weight matrix.</li>
<li><strong>input_dim</strong> (<em>int, required</em>) – Vocabulary size of the input indices.</li>
<li><strong>output_dim</strong> (<em>int, required</em>) – Dimension of the embedding vectors.</li>
<li><strong>dtype</strong> (<em>{'float16', 'float32', 'float64', 'int32', 'int64', 'int8', 'uint8'},optional, default='float32'</em>) – Data type of weight.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<p>Assume we want to map the 26 English alphabet letters to 16-dimensional
vectorial representations.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">vocabulary_size</span> <span class="o">=</span> <span class="mi">26</span>
<span class="gp">>>> </span><span class="n">embed_dim</span> <span class="o">=</span> <span class="mi">16</span>
<span class="gp">>>> </span><span class="n">seq_len</span><span class="p">,</span> <span class="n">batch_size</span> <span class="o">=</span> <span class="p">(</span><span class="mi">10</span><span class="p">,</span> <span class="mi">64</span><span class="p">)</span>
<span class="gp">>>> </span><span class="nb">input</span> <span class="o">=</span> <span class="n">Variable</span><span class="p">(</span><span class="s1">'letters'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">op</span> <span class="o">=</span> <span class="n">Embedding</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="nb">input</span><span class="p">,</span> <span class="n">input_dim</span><span class="o">=</span><span class="n">vocabulary_size</span><span class="p">,</span> <span class="n">output_dim</span><span class="o">=</span><span class="n">embed_dim</span><span class="p">,</span>
<span class="go">...name='embed')</span>
<span class="gp">>>> </span><span class="n">SymbolDoc</span><span class="o">.</span><span class="n">get_output_shape</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">letters</span><span class="o">=</span><span class="p">(</span><span class="n">seq_len</span><span class="p">,</span> <span class="n">batch_size</span><span class="p">))</span>
<span class="go">{'embed_output': (10L, 64L, 16L)}</span>
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">vocab_size</span><span class="p">,</span> <span class="n">embed_dim</span> <span class="o">=</span> <span class="p">(</span><span class="mi">26</span><span class="p">,</span> <span class="mi">16</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">batch_size</span> <span class="o">=</span> <span class="mi">12</span>
<span class="gp">>>> </span><span class="n">word_vecs</span> <span class="o">=</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">random_arrays</span><span class="p">((</span><span class="n">vocab_size</span><span class="p">,</span> <span class="n">embed_dim</span><span class="p">))</span>
<span class="gp">>>> </span><span class="n">op</span> <span class="o">=</span> <span class="n">Embedding</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">'embed'</span><span class="p">,</span> <span class="n">input_dim</span><span class="o">=</span><span class="n">vocab_size</span><span class="p">,</span> <span class="n">output_dim</span><span class="o">=</span><span class="n">embed_dim</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="n">vocab_size</span><span class="p">,</span> <span class="n">batch_size</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">simple_forward</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">embed_data</span><span class="o">=</span><span class="n">x</span><span class="p">,</span> <span class="n">embed_weight</span><span class="o">=</span><span class="n">word_vecs</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">y_np</span> <span class="o">=</span> <span class="n">word_vecs</span><span class="p">[</span><span class="n">x</span><span class="p">]</span>
<span class="gp">>>> </span><span class="n">test_utils</span><span class="o">.</span><span class="n">almost_equal</span><span class="p">(</span><span class="n">y</span><span class="p">,</span> <span class="n">y_np</span><span class="p">)</span>
<span class="go">True</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Flatten">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Flatten</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Flatten" title="Permalink to this definition"></a></dt>
<dd><p>Flattens the input array into a 2-D array by collapsing the higher dimensions.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>Flatten</cite> is deprecated. Use <cite>flatten</cite> instead.</p>
</div>
<p>For an input array with shape <code class="docutils literal"><span class="pre">(d1,</span> <span class="pre">d2,</span> <span class="pre">...,</span> <span class="pre">dk)</span></code>, <cite>flatten</cite> operation reshapes
the input array into an output array of shape <code class="docutils literal"><span class="pre">(d1,</span> <span class="pre">d2*...*dk)</span></code>.</p>
<p>Note that the bahavior of this function is different from numpy.ndarray.flatten,
which behaves similar to mxnet.ndarray.reshape((-1,)).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span>
<span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span>
<span class="p">[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">],</span>
<span class="p">[</span><span class="mi">7</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">9</span><span class="p">]</span>
<span class="p">],</span>
<span class="p">[</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span>
<span class="p">[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">],</span>
<span class="p">[</span><span class="mi">7</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">9</span><span class="p">]</span>
<span class="p">]],</span>
<span class="n">flatten</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">9.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">9.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/matrix_op.cc:L257</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<p>Flatten is usually applied before <cite>FullyConnected</cite>, to reshape the 4D tensor
produced by convolutional layers to 2D matrix:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">)</span> <span class="c1"># say this is 4D from some conv/pool</span>
<span class="gp">>>> </span><span class="n">flatten</span> <span class="o">=</span> <span class="n">Flatten</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'flat'</span><span class="p">)</span> <span class="c1"># now this is 2D</span>
<span class="gp">>>> </span><span class="n">SymbolDoc</span><span class="o">.</span><span class="n">get_output_shape</span><span class="p">(</span><span class="n">flatten</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span>
<span class="go">{'flat_output': (2L, 60L)}</span>
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">test_dims</span> <span class="o">=</span> <span class="p">[(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">),</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="mi">2</span><span class="p">,)]</span>
<span class="gp">>>> </span><span class="n">op</span> <span class="o">=</span> <span class="n">Flatten</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">'flat'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">dims</span> <span class="ow">in</span> <span class="n">test_dims</span><span class="p">:</span>
<span class="gp">... </span><span class="n">x</span> <span class="o">=</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">random_arrays</span><span class="p">(</span><span class="n">dims</span><span class="p">)</span>
<span class="gp">... </span><span class="n">y</span> <span class="o">=</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">simple_forward</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">flat_data</span><span class="o">=</span><span class="n">x</span><span class="p">)</span>
<span class="gp">... </span><span class="n">y_np</span> <span class="o">=</span> <span class="n">x</span><span class="o">.</span><span class="n">reshape</span><span class="p">((</span><span class="n">dims</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">np</span><span class="o">.</span><span class="n">prod</span><span class="p">(</span><span class="n">dims</span><span class="p">[</span><span class="mi">1</span><span class="p">:])</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="s1">'int32'</span><span class="p">)))</span>
<span class="gp">... </span><span class="k">print</span><span class="p">(</span><span class="s1">'</span><span class="si">%s</span><span class="s1">: </span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">dims</span><span class="p">,</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">almost_equal</span><span class="p">(</span><span class="n">y</span><span class="p">,</span> <span class="n">y_np</span><span class="p">)))</span>
<span class="go">(2, 3, 4, 5): True</span>
<span class="go">(2, 3): True</span>
<span class="go">(2,): True</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.FullyConnected">
<code class="descclassname">mxnet.symbol.</code><code class="descname">FullyConnected</code><span class="sig-paren">(</span><em>data=None</em>, <em>weight=None</em>, <em>bias=None</em>, <em>num_hidden=_Null</em>, <em>no_bias=_Null</em>, <em>flatten=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.FullyConnected" title="Permalink to this definition"></a></dt>
<dd><p>Applies a linear transformation: <span class="math">\(Y = XW^T + b\)</span>.</p>
<p>If <code class="docutils literal"><span class="pre">flatten</span></code> is set to be true, then the shapes are:</p>
<ul class="simple">
<li><strong>data</strong>: <cite>(batch_size, x1, x2, ..., xn)</cite></li>
<li><strong>weight</strong>: <cite>(num_hidden, x1 * x2 * ... * xn)</cite></li>
<li><strong>bias</strong>: <cite>(num_hidden,)</cite></li>
<li><strong>out</strong>: <cite>(batch_size, num_hidden)</cite></li>
</ul>
<p>If <code class="docutils literal"><span class="pre">flatten</span></code> is set to be false, then the shapes are:</p>
<ul class="simple">
<li><strong>data</strong>: <cite>(x1, x2, ..., xn, input_dim)</cite></li>
<li><strong>weight</strong>: <cite>(num_hidden, input_dim)</cite></li>
<li><strong>bias</strong>: <cite>(num_hidden,)</cite></li>
<li><strong>out</strong>: <cite>(x1, x2, ..., xn, num_hidden)</cite></li>
</ul>
<p>The learnable parameters include both <code class="docutils literal"><span class="pre">weight</span></code> and <code class="docutils literal"><span class="pre">bias</span></code>.</p>
<p>If <code class="docutils literal"><span class="pre">no_bias</span></code> is set to be true, then the <code class="docutils literal"><span class="pre">bias</span></code> term is ignored.</p>
<p>Defined in src/operator/nn/fully_connected.cc:L193</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data.</li>
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight matrix.</li>
<li><strong>bias</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Bias parameter.</li>
<li><strong>num_hidden</strong> (<em>int, required</em>) – Number of hidden nodes of the output.</li>
<li><strong>no_bias</strong> (<em>boolean, optional, default=0</em>) – Whether to disable bias parameter.</li>
<li><strong>flatten</strong> (<em>boolean, optional, default=1</em>) – Whether to collapse all but the first axis of the input data tensor.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<p>Construct a fully connected operator with target dimension 512.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">)</span> <span class="c1"># or some constructed NN</span>
<span class="gp">>>> </span><span class="n">op</span> <span class="o">=</span> <span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span>
<span class="gp">... </span><span class="n">num_hidden</span><span class="o">=</span><span class="mi">512</span><span class="p">,</span>
<span class="gp">... </span><span class="n">name</span><span class="o">=</span><span class="s1">'FC1'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">op</span>
<span class="go"><Symbol FC1></span>
<span class="gp">>>> </span><span class="n">SymbolDoc</span><span class="o">.</span><span class="n">get_output_shape</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="p">(</span><span class="mi">128</span><span class="p">,</span> <span class="mi">100</span><span class="p">))</span>
<span class="go">{'FC1_output': (128L, 512L)}</span>
</pre></div>
</div>
<p>A simple 3-layer MLP with ReLU activation:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">net</span> <span class="o">=</span> <span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">dim</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">([</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">]):</span>
<span class="gp">... </span><span class="n">net</span> <span class="o">=</span> <span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">net</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="n">dim</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'FC</span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="n">i</span><span class="p">)</span>
<span class="gp">... </span><span class="n">net</span> <span class="o">=</span> <span class="n">Activation</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">net</span><span class="p">,</span> <span class="n">act_type</span><span class="o">=</span><span class="s1">'relu'</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'ReLU</span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="n">i</span><span class="p">)</span>
<span class="gp">>>> </span><span class="c1"># 10-class predictor (e.g. MNIST)</span>
<span class="gp">>>> </span><span class="n">net</span> <span class="o">=</span> <span class="n">FullyConnected</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">net</span><span class="p">,</span> <span class="n">num_hidden</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'pred'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">net</span>
<span class="go"><Symbol pred></span>
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">dim_in</span><span class="p">,</span> <span class="n">dim_out</span> <span class="o">=</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">x</span><span class="p">,</span> <span class="n">w</span><span class="p">,</span> <span class="n">b</span> <span class="o">=</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">random_arrays</span><span class="p">((</span><span class="mi">10</span><span class="p">,</span> <span class="n">dim_in</span><span class="p">),</span> <span class="p">(</span><span class="n">dim_out</span><span class="p">,</span> <span class="n">dim_in</span><span class="p">),</span> <span class="p">(</span><span class="n">dim_out</span><span class="p">,))</span>
<span class="gp">>>> </span><span class="n">op</span> <span class="o">=</span> <span class="n">FullyConnected</span><span class="p">(</span><span class="n">num_hidden</span><span class="o">=</span><span class="n">dim_out</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'FC'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">out</span> <span class="o">=</span> <span class="n">test_utils</span><span class="o">.</span><span class="n">simple_forward</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">FC_data</span><span class="o">=</span><span class="n">x</span><span class="p">,</span> <span class="n">FC_weight</span><span class="o">=</span><span class="n">w</span><span class="p">,</span> <span class="n">FC_bias</span><span class="o">=</span><span class="n">b</span><span class="p">)</span>
<span class="gp">>>> </span><span class="c1"># numpy implementation of FullyConnected</span>
<span class="gp">>>> </span><span class="n">out_np</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">w</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="o">+</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="n">test_utils</span><span class="o">.</span><span class="n">almost_equal</span><span class="p">(</span><span class="n">out</span><span class="p">,</span> <span class="n">out_np</span><span class="p">)</span>
<span class="go">True</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.GridGenerator">
<code class="descclassname">mxnet.symbol.</code><code class="descname">GridGenerator</code><span class="sig-paren">(</span><em>data=None</em>, <em>transform_type=_Null</em>, <em>target_shape=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.GridGenerator" title="Permalink to this definition"></a></dt>
<dd><p>Generates 2D sampling grid for bilinear sampling.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to the function.</li>
<li><strong>transform_type</strong> (<em>{'affine', 'warp'}, required</em>) – The type of transformation. For <cite>affine</cite>, input data should be an affine matrix of size (batch, 6). For <cite>warp</cite>, input data should be an optical flow of size (batch, 2, h, w).</li>
<li><strong>target_shape</strong> (<em>Shape(tuple), optional, default=[0,0]</em>) – Specifies the output shape (H, W). This is required if transformation type is <cite>affine</cite>. If transformation type is <cite>warp</cite>, this parameter is ignored.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.IdentityAttachKLSparseReg">
<code class="descclassname">mxnet.symbol.</code><code class="descname">IdentityAttachKLSparseReg</code><span class="sig-paren">(</span><em>data=None</em>, <em>sparseness_target=_Null</em>, <em>penalty=_Null</em>, <em>momentum=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.IdentityAttachKLSparseReg" title="Permalink to this definition"></a></dt>
<dd><p>Apply a sparse regularization to the output a sigmoid activation function.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data.</li>
<li><strong>sparseness_target</strong> (<em>float, optional, default=0.1</em>) – The sparseness target</li>
<li><strong>penalty</strong> (<em>float, optional, default=0.001</em>) – The tradeoff parameter for the sparseness penalty</li>
<li><strong>momentum</strong> (<em>float, optional, default=0.9</em>) – The momentum for running average</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.InstanceNorm">
<code class="descclassname">mxnet.symbol.</code><code class="descname">InstanceNorm</code><span class="sig-paren">(</span><em>data=None</em>, <em>gamma=None</em>, <em>beta=None</em>, <em>eps=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.InstanceNorm" title="Permalink to this definition"></a></dt>
<dd><p>Applies instance normalization to the n-dimensional input array.</p>
<p>This operator takes an n-dimensional input array where (n>2) and normalizes
the input using the following formula:</p>
<div class="math">
\[out = \frac{x - mean[data]}{ \sqrt{Var[data]} + \epsilon} * gamma + beta\]</div>
<p>This layer is similar to batch normalization layer (<cite>BatchNorm</cite>)
with two differences: first, the normalization is
carried out per example (instance), not over a batch. Second, the
same normalization is applied both at test and train time. This
operation is also known as <cite>contrast normalization</cite>.</p>
<p>If the input data is of shape [batch, channel, spacial_dim1, spacial_dim2, ...],
<cite>gamma</cite> and <cite>beta</cite> parameters must be vectors of shape [channel].</p>
<p>This implementation is based on paper:</p>
<table class="docutils footnote" frame="void" id="id27" rules="none">
<colgroup><col class="label"/><col/></colgroup>
<tbody valign="top">
<tr><td class="label">[1]</td><td>Instance Normalization: The Missing Ingredient for Fast Stylization,
D. Ulyanov, A. Vedaldi, V. Lempitsky, 2016 (arXiv:1607.08022v2).</td></tr>
</tbody>
</table>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// Input of shape (2,1,2)
x = [[[ 1.1, 2.2]],
[[ 3.3, 4.4]]]
// gamma parameter of length 1
gamma = [1.5]
// beta parameter of length 1
beta = [0.5]
// Instance normalization is calculated with the above formula
InstanceNorm(x,gamma,beta) = [[[-0.997527 , 1.99752665]],
[[-0.99752653, 1.99752724]]]
</pre></div>
</div>
<p>Defined in src/operator/instance_norm.cc:L95</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – An n-dimensional input array (n > 2) of the form [batch, channel, spatial_dim1, spatial_dim2, ...].</li>
<li><strong>gamma</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – A vector of length ‘channel’, which multiplies the normalized input.</li>
<li><strong>beta</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – A vector of length ‘channel’, which is added to the product of the normalized input and the weight.</li>
<li><strong>eps</strong> (<em>float, optional, default=0.001</em>) – An <cite>epsilon</cite> parameter to prevent division by 0.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.L2Normalization">
<code class="descclassname">mxnet.symbol.</code><code class="descname">L2Normalization</code><span class="sig-paren">(</span><em>data=None</em>, <em>eps=_Null</em>, <em>mode=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.L2Normalization" title="Permalink to this definition"></a></dt>
<dd><p>Normalize the input array using the L2 norm.</p>
<p>For 1-D NDArray, it computes:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">out</span> <span class="o">=</span> <span class="n">data</span> <span class="o">/</span> <span class="n">sqrt</span><span class="p">(</span><span class="nb">sum</span><span class="p">(</span><span class="n">data</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">+</span> <span class="n">eps</span><span class="p">)</span>
</pre></div>
</div>
<p>For N-D NDArray, if the input array has shape (N, N, ..., N),</p>
<p>with <code class="docutils literal"><span class="pre">mode</span></code> = <code class="docutils literal"><span class="pre">instance</span></code>, it normalizes each instance in the multidimensional
array by its L2 norm.:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>for i in 0...N
out[i,:,:,...,:] = data[i,:,:,...,:] / sqrt(sum(data[i,:,:,...,:] ** 2) + eps)
</pre></div>
</div>
<p>with <code class="docutils literal"><span class="pre">mode</span></code> = <code class="docutils literal"><span class="pre">channel</span></code>, it normalizes each channel in the array by its L2 norm.:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>for i in 0...N
out[:,i,:,...,:] = data[:,i,:,...,:] / sqrt(sum(data[:,i,:,...,:] ** 2) + eps)
</pre></div>
</div>
<p>with <code class="docutils literal"><span class="pre">mode</span></code> = <code class="docutils literal"><span class="pre">spatial</span></code>, it normalizes the cross channel norm for each position
in the array by its L2 norm.:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>for dim in 2...N
for i in 0...N
out[.....,i,...] = take(out, indices=i, axis=dim) / sqrt(sum(take(out, indices=i, axis=dim) ** 2) + eps)
-dim-
</pre></div>
</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[[1,2],
[3,4]],
[[2,2],
[5,6]]]
L2Normalization(x, mode='instance')
=[[[ 0.18257418 0.36514837]
[ 0.54772252 0.73029673]]
[[ 0.24077171 0.24077171]
[ 0.60192931 0.72231513]]]
L2Normalization(x, mode='channel')
=[[[ 0.31622776 0.44721359]
[ 0.94868326 0.89442718]]
[[ 0.37139067 0.31622776]
[ 0.92847669 0.94868326]]]
L2Normalization(x, mode='spatial')
=[[[ 0.44721359 0.89442718]
[ 0.60000002 0.80000001]]
[[ 0.70710677 0.70710677]
[ 0.6401844 0.76822126]]]
</pre></div>
</div>
<p>Defined in src/operator/l2_normalization.cc:L93</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input array to normalize.</li>
<li><strong>eps</strong> (<em>float, optional, default=1e-10</em>) – A small constant for numerical stability.</li>
<li><strong>mode</strong> (<em>{'channel', 'instance', 'spatial'},optional, default='instance'</em>) – Specify the dimension along which to compute L2 norm.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.LRN">
<code class="descclassname">mxnet.symbol.</code><code class="descname">LRN</code><span class="sig-paren">(</span><em>data=None</em>, <em>alpha=_Null</em>, <em>beta=_Null</em>, <em>knorm=_Null</em>, <em>nsize=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.LRN" title="Permalink to this definition"></a></dt>
<dd><p>Applies local response normalization to the input.</p>
<p>The local response normalization layer performs “lateral inhibition” by normalizing
over local input regions.</p>
<p>If <span class="math">\(a_{x,y}^{i}\)</span> is the activity of a neuron computed by applying kernel <span class="math">\(i\)</span> at position
<span class="math">\((x, y)\)</span> and then applying the ReLU nonlinearity, the response-normalized
activity <span class="math">\(b_{x,y}^{i}\)</span> is given by the expression:</p>
<div class="math">
\[b_{x,y}^{i} = \frac{a_{x,y}^{i}}{\Bigg({k + \alpha \sum_{j=max(0, i-\frac{n}{2})}^{min(N-1, i+\frac{n}{2})} (a_{x,y}^{j})^{2}}\Bigg)^{\beta}}\]</div>
<p>where the sum runs over <span class="math">\(n\)</span> “adjacent” kernel maps at the same spatial position, and <span class="math">\(N\)</span> is the total
number of kernels in the layer.</p>
<p>Defined in src/operator/nn/lrn.cc:L175</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to LRN</li>
<li><strong>alpha</strong> (<em>float, optional, default=0.0001</em>) – The variance scaling parameter <span class="math">\(lpha\)</span> in the LRN expression.</li>
<li><strong>beta</strong> (<em>float, optional, default=0.75</em>) – The power parameter <span class="math">\(eta\)</span> in the LRN expression.</li>
<li><strong>knorm</strong> (<em>float, optional, default=2</em>) – The parameter <span class="math">\(k\)</span> in the LRN expression.</li>
<li><strong>nsize</strong> (<em>int (non-negative), required</em>) – normalization window width in elements.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.LeakyReLU">
<code class="descclassname">mxnet.symbol.</code><code class="descname">LeakyReLU</code><span class="sig-paren">(</span><em>data=None</em>, <em>gamma=None</em>, <em>act_type=_Null</em>, <em>slope=_Null</em>, <em>lower_bound=_Null</em>, <em>upper_bound=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.LeakyReLU" title="Permalink to this definition"></a></dt>
<dd><p>Applies Leaky rectified linear unit activation element-wise to the input.</p>
<p>Leaky ReLUs attempt to fix the “dying ReLU” problem by allowing a small <cite>slope</cite>
when the input is negative and has a slope of one when input is positive.</p>
<p>The following modified ReLU Activation functions are supported:</p>
<ul class="simple">
<li><em>elu</em>: Exponential Linear Unit. <cite>y = x > 0 ? x : slope * (exp(x)-1)</cite></li>
<li><em>leaky</em>: Leaky ReLU. <cite>y = x > 0 ? x : slope * x</cite></li>
<li><em>prelu</em>: Parametric ReLU. This is same as <em>leaky</em> except that <cite>slope</cite> is learnt during training.</li>
<li><em>rrelu</em>: Randomized ReLU. same as <em>leaky</em> but the <cite>slope</cite> is uniformly and randomly chosen from
<em>[lower_bound, upper_bound)</em> for training, while fixed to be
<em>(lower_bound+upper_bound)/2</em> for inference.</li>
</ul>
<p>Defined in src/operator/leaky_relu.cc:L58</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to activation function.</li>
<li><strong>gamma</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Slope parameter for PReLU. Only required when act_type is ‘prelu’. It should be either a vector of size 1, or the same size as the second dimension of data.</li>
<li><strong>act_type</strong> (<em>{'elu', 'leaky', 'prelu', 'rrelu'},optional, default='leaky'</em>) – Activation function to be applied.</li>
<li><strong>slope</strong> (<em>float, optional, default=0.25</em>) – Init slope for the activation. (For leaky and elu only)</li>
<li><strong>lower_bound</strong> (<em>float, optional, default=0.125</em>) – Lower bound of random slope. (For rrelu only)</li>
<li><strong>upper_bound</strong> (<em>float, optional, default=0.334</em>) – Upper bound of random slope. (For rrelu only)</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.LinearRegressionOutput">
<code class="descclassname">mxnet.symbol.</code><code class="descname">LinearRegressionOutput</code><span class="sig-paren">(</span><em>data=None</em>, <em>label=None</em>, <em>grad_scale=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.LinearRegressionOutput" title="Permalink to this definition"></a></dt>
<dd><p>Computes and optimizes for squared loss during backward propagation.
Just outputs <code class="docutils literal"><span class="pre">data</span></code> during forward propagation.</p>
<p>If <span class="math">\(\hat{y}_i\)</span> is the predicted value of the i-th sample, and <span class="math">\(y_i\)</span> is the corresponding target value,
then the squared loss estimated over <span class="math">\(n\)</span> samples is defined as</p>
<p><span class="math">\(\text{SquaredLoss}(\textbf{Y}, \hat{\textbf{Y}} ) = \frac{1}{n} \sum_{i=0}^{n-1} \lVert \textbf{y}_i - \hat{\textbf{y}}_i \rVert_2\)</span></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Use the LinearRegressionOutput as the final output layer of a net.</p>
</div>
<p>By default, gradients of this loss function are scaled by factor <cite>1/m</cite>, where m is the number of regression outputs of a training example.
The parameter <cite>grad_scale</cite> can be used to change this scale to <cite>grad_scale/m</cite>.</p>
<p>Defined in src/operator/regression_output.cc:L80</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to the function.</li>
<li><strong>label</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input label to the function.</li>
<li><strong>grad_scale</strong> (<em>float, optional, default=1</em>) – Scale the gradient by a float factor</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.LogisticRegressionOutput">
<code class="descclassname">mxnet.symbol.</code><code class="descname">LogisticRegressionOutput</code><span class="sig-paren">(</span><em>data=None</em>, <em>label=None</em>, <em>grad_scale=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.LogisticRegressionOutput" title="Permalink to this definition"></a></dt>
<dd><p>Applies a logistic function to the input.</p>
<p>The logistic function, also known as the sigmoid function, is computed as
<span class="math">\(\frac{1}{1+exp(-\textbf{x})}\)</span>.</p>
<p>Commonly, the sigmoid is used to squash the real-valued output of a linear model
:math:wTx+b into the [0,1] range so that it can be interpreted as a probability.
It is suitable for binary classification or probability prediction tasks.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Use the LogisticRegressionOutput as the final output layer of a net.</p>
</div>
<p>By default, gradients of this loss function are scaled by factor <cite>1/m</cite>, where m is the number of regression outputs of a training example.
The parameter <cite>grad_scale</cite> can be used to change this scale to <cite>grad_scale/m</cite>.</p>
<p>Defined in src/operator/regression_output.cc:L122</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to the function.</li>
<li><strong>label</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input label to the function.</li>
<li><strong>grad_scale</strong> (<em>float, optional, default=1</em>) – Scale the gradient by a float factor</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.MAERegressionOutput">
<code class="descclassname">mxnet.symbol.</code><code class="descname">MAERegressionOutput</code><span class="sig-paren">(</span><em>data=None</em>, <em>label=None</em>, <em>grad_scale=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.MAERegressionOutput" title="Permalink to this definition"></a></dt>
<dd><p>Computes mean absolute error of the input.</p>
<p>MAE is a risk metric corresponding to the expected value of the absolute error.</p>
<p>If <span class="math">\(\hat{y}_i\)</span> is the predicted value of the i-th sample, and <span class="math">\(y_i\)</span> is the corresponding target value,
then the mean absolute error (MAE) estimated over <span class="math">\(n\)</span> samples is defined as</p>
<p><span class="math">\(\text{MAE}(\textbf{Y}, \hat{\textbf{Y}} ) = \frac{1}{n} \sum_{i=0}^{n-1} \lVert \textbf{y}_i - \hat{\textbf{y}}_i \rVert_1\)</span></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Use the MAERegressionOutput as the final output layer of a net.</p>
</div>
<p>By default, gradients of this loss function are scaled by factor <cite>1/m</cite>, where m is the number of regression outputs of a training example.
The parameter <cite>grad_scale</cite> can be used to change this scale to <cite>grad_scale/m</cite>.</p>
<p>Defined in src/operator/regression_output.cc:L101</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to the function.</li>
<li><strong>label</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input label to the function.</li>
<li><strong>grad_scale</strong> (<em>float, optional, default=1</em>) – Scale the gradient by a float factor</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.MakeLoss">
<code class="descclassname">mxnet.symbol.</code><code class="descname">MakeLoss</code><span class="sig-paren">(</span><em>data=None</em>, <em>grad_scale=_Null</em>, <em>valid_thresh=_Null</em>, <em>normalization=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.MakeLoss" title="Permalink to this definition"></a></dt>
<dd><p>Make your own loss function in network construction.</p>
<p>This operator accepts a customized loss function symbol as a terminal loss and
the symbol should be an operator with no backward dependency.
The output of this function is the gradient of loss with respect to the input data.</p>
<p>For example, if you are a making a cross entropy loss function. Assume <code class="docutils literal"><span class="pre">out</span></code> is the
predicted output and <code class="docutils literal"><span class="pre">label</span></code> is the true label, then the cross entropy can be defined as:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">cross_entropy</span> <span class="o">=</span> <span class="n">label</span> <span class="o">*</span> <span class="n">log</span><span class="p">(</span><span class="n">out</span><span class="p">)</span> <span class="o">+</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">label</span><span class="p">)</span> <span class="o">*</span> <span class="n">log</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">out</span><span class="p">)</span>
<span class="n">loss</span> <span class="o">=</span> <span class="n">MakeLoss</span><span class="p">(</span><span class="n">cross_entropy</span><span class="p">)</span>
</pre></div>
</div>
<p>We will need to use <code class="docutils literal"><span class="pre">MakeLoss</span></code> when we are creating our own loss function or we want to
combine multiple loss functions. Also we may want to stop some variables’ gradients
from backpropagation. See more detail in <code class="docutils literal"><span class="pre">BlockGrad</span></code> or <code class="docutils literal"><span class="pre">stop_gradient</span></code>.</p>
<p>In addition, we can give a scale to the loss by setting <code class="docutils literal"><span class="pre">grad_scale</span></code>,
so that the gradient of the loss will be rescaled in the backpropagation.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This operator should be used as a Symbol instead of NDArray.</p>
</div>
<p>Defined in src/operator/make_loss.cc:L71</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input array.</li>
<li><strong>grad_scale</strong> (<em>float, optional, default=1</em>) – Gradient scale as a supplement to unary and binary operators</li>
<li><strong>valid_thresh</strong> (<em>float, optional, default=0</em>) – clip each element in the array to 0 when it is less than <code class="docutils literal"><span class="pre">valid_thresh</span></code>. This is used when <code class="docutils literal"><span class="pre">normalization</span></code> is set to <code class="docutils literal"><span class="pre">'valid'</span></code>.</li>
<li><strong>normalization</strong> (<em>{'batch', 'null', 'valid'},optional, default='null'</em>) – If this is set to null, the output gradient will not be normalized. If this is set to batch, the output gradient will be divided by the batch size. If this is set to valid, the output gradient will be divided by the number of valid input elements.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Pad">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Pad</code><span class="sig-paren">(</span><em>data=None</em>, <em>mode=_Null</em>, <em>pad_width=_Null</em>, <em>constant_value=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Pad" title="Permalink to this definition"></a></dt>
<dd><p>Pads an input array with a constant or edge values of the array.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>Pad</cite> is deprecated. Use <cite>pad</cite> instead.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Current implementation only supports 4D and 5D input arrays with padding applied
only on axes 1, 2 and 3. Expects axes 4 and 5 in <cite>pad_width</cite> to be zero.</p>
</div>
<p>This operation pads an input array with either a <cite>constant_value</cite> or edge values
along each axis of the input array. The amount of padding is specified by <cite>pad_width</cite>.</p>
<p><cite>pad_width</cite> is a tuple of integer padding widths for each axis of the format
<code class="docutils literal"><span class="pre">(before_1,</span> <span class="pre">after_1,</span> <span class="pre">...</span> <span class="pre">,</span> <span class="pre">before_N,</span> <span class="pre">after_N)</span></code>. The <cite>pad_width</cite> should be of length <code class="docutils literal"><span class="pre">2*N</span></code>
where <code class="docutils literal"><span class="pre">N</span></code> is the number of dimensions of the array.</p>
<p>For dimension <code class="docutils literal"><span class="pre">N</span></code> of the input array, <code class="docutils literal"><span class="pre">before_N</span></code> and <code class="docutils literal"><span class="pre">after_N</span></code> indicates how many values
to add before and after the elements of the array along dimension <code class="docutils literal"><span class="pre">N</span></code>.
The widths of the higher two dimensions <code class="docutils literal"><span class="pre">before_1</span></code>, <code class="docutils literal"><span class="pre">after_1</span></code>, <code class="docutils literal"><span class="pre">before_2</span></code>,
<code class="docutils literal"><span class="pre">after_2</span></code> must be 0.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[[[ 1. 2. 3.]
[ 4. 5. 6.]]
[[ 7. 8. 9.]
[ 10. 11. 12.]]]
[[[ 11. 12. 13.]
[ 14. 15. 16.]]
[[ 17. 18. 19.]
[ 20. 21. 22.]]]]
pad(x,mode="edge", pad_width=(0,0,0,0,1,1,1,1)) =
[[[[ 1. 1. 2. 3. 3.]
[ 1. 1. 2. 3. 3.]
[ 4. 4. 5. 6. 6.]
[ 4. 4. 5. 6. 6.]]
[[ 7. 7. 8. 9. 9.]
[ 7. 7. 8. 9. 9.]
[ 10. 10. 11. 12. 12.]
[ 10. 10. 11. 12. 12.]]]
[[[ 11. 11. 12. 13. 13.]
[ 11. 11. 12. 13. 13.]
[ 14. 14. 15. 16. 16.]
[ 14. 14. 15. 16. 16.]]
[[ 17. 17. 18. 19. 19.]
[ 17. 17. 18. 19. 19.]
[ 20. 20. 21. 22. 22.]
[ 20. 20. 21. 22. 22.]]]]
pad(x, mode="constant", constant_value=0, pad_width=(0,0,0,0,1,1,1,1)) =
[[[[ 0. 0. 0. 0. 0.]
[ 0. 1. 2. 3. 0.]
[ 0. 4. 5. 6. 0.]
[ 0. 0. 0. 0. 0.]]
[[ 0. 0. 0. 0. 0.]
[ 0. 7. 8. 9. 0.]
[ 0. 10. 11. 12. 0.]
[ 0. 0. 0. 0. 0.]]]
[[[ 0. 0. 0. 0. 0.]
[ 0. 11. 12. 13. 0.]
[ 0. 14. 15. 16. 0.]
[ 0. 0. 0. 0. 0.]]
[[ 0. 0. 0. 0. 0.]
[ 0. 17. 18. 19. 0.]
[ 0. 20. 21. 22. 0.]
[ 0. 0. 0. 0. 0.]]]]
</pre></div>
</div>
<p>Defined in src/operator/pad.cc:L766</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – An n-dimensional input array.</li>
<li><strong>mode</strong> (<em>{'constant', 'edge', 'reflect'}, required</em>) – Padding type to use. “constant” pads with <cite>constant_value</cite> “edge” pads using the edge values of the input array “reflect” pads by reflecting values with respect to the edges.</li>
<li><strong>pad_width</strong> (<em>Shape(tuple), required</em>) – Widths of the padding regions applied to the edges of each axis. It is a tuple of integer padding widths for each axis of the format <code class="docutils literal"><span class="pre">(before_1,</span> <span class="pre">after_1,</span> <span class="pre">...</span> <span class="pre">,</span> <span class="pre">before_N,</span> <span class="pre">after_N)</span></code>. It should be of length <code class="docutils literal"><span class="pre">2*N</span></code> where <code class="docutils literal"><span class="pre">N</span></code> is the number of dimensions of the array.This is equivalent to pad_width in numpy.pad, but flattened.</li>
<li><strong>constant_value</strong> (<em>double, optional, default=0</em>) – The value used for padding when <cite>mode</cite> is “constant”.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Pooling">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Pooling</code><span class="sig-paren">(</span><em>data=None</em>, <em>global_pool=_Null</em>, <em>cudnn_off=_Null</em>, <em>kernel=_Null</em>, <em>pool_type=_Null</em>, <em>pooling_convention=_Null</em>, <em>stride=_Null</em>, <em>pad=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Pooling" title="Permalink to this definition"></a></dt>
<dd><p>Performs pooling on the input.</p>
<p>The shapes for 1-D pooling are</p>
<ul class="simple">
<li><strong>data</strong>: <em>(batch_size, channel, width)</em>,</li>
<li><strong>out</strong>: <em>(batch_size, num_filter, out_width)</em>.</li>
</ul>
<p>The shapes for 2-D pooling are</p>
<ul>
<li><p class="first"><strong>data</strong>: <em>(batch_size, channel, height, width)</em></p>
</li>
<li><p class="first"><strong>out</strong>: <em>(batch_size, num_filter, out_height, out_width)</em>, with:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">out_height</span> <span class="o">=</span> <span class="n">f</span><span class="p">(</span><span class="n">height</span><span class="p">,</span> <span class="n">kernel</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">pad</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">stride</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">out_width</span> <span class="o">=</span> <span class="n">f</span><span class="p">(</span><span class="n">width</span><span class="p">,</span> <span class="n">kernel</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">pad</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">stride</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
</pre></div>
</div>
</li>
</ul>
<p>The definition of <em>f</em> depends on <code class="docutils literal"><span class="pre">pooling_convention</span></code>, which has two options:</p>
<ul>
<li><p class="first"><strong>valid</strong> (default):</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">f</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">k</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">s</span><span class="p">)</span> <span class="o">=</span> <span class="n">floor</span><span class="p">((</span><span class="n">x</span><span class="o">+</span><span class="mi">2</span><span class="o">*</span><span class="n">p</span><span class="o">-</span><span class="n">k</span><span class="p">)</span><span class="o">/</span><span class="n">s</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span>
</pre></div>
</div>
</li>
<li><p class="first"><strong>full</strong>, which is compatible with Caffe:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">f</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">k</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">s</span><span class="p">)</span> <span class="o">=</span> <span class="n">ceil</span><span class="p">((</span><span class="n">x</span><span class="o">+</span><span class="mi">2</span><span class="o">*</span><span class="n">p</span><span class="o">-</span><span class="n">k</span><span class="p">)</span><span class="o">/</span><span class="n">s</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span>
</pre></div>
</div>
</li>
</ul>
<p>But <code class="docutils literal"><span class="pre">global_pool</span></code> is set to be true, then do a global pooling, namely reset
<code class="docutils literal"><span class="pre">kernel=(height,</span> <span class="pre">width)</span></code>.</p>
<p>Three pooling options are supported by <code class="docutils literal"><span class="pre">pool_type</span></code>:</p>
<ul class="simple">
<li><strong>avg</strong>: average pooling</li>
<li><strong>max</strong>: max pooling</li>
<li><strong>sum</strong>: sum pooling</li>
</ul>
<p>For 3-D pooling, an additional <em>depth</em> dimension is added before
<em>height</em>. Namely the input data will have shape <em>(batch_size, channel, depth,
height, width)</em>.</p>
<p>Defined in src/operator/nn/pooling.cc:L355</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to the pooling operator.</li>
<li><strong>global_pool</strong> (<em>boolean, optional, default=0</em>) – Ignore kernel size, do global pooling based on current input feature map.</li>
<li><strong>cudnn_off</strong> (<em>boolean, optional, default=0</em>) – Turn off cudnn pooling and use MXNet pooling operator.</li>
<li><strong>kernel</strong> (<em>Shape(tuple), required</em>) – Pooling kernel size: (y, x) or (d, y, x)</li>
<li><strong>pool_type</strong> (<em>{'avg', 'max', 'sum'}, required</em>) – Pooling type to be applied.</li>
<li><strong>pooling_convention</strong> (<em>{'full', 'valid'},optional, default='valid'</em>) – Pooling convention to be applied.</li>
<li><strong>stride</strong> (<em>Shape(tuple), optional, default=[]</em>) – Stride: for pooling (y, x) or (d, y, x). Defaults to 1 for each dimension.</li>
<li><strong>pad</strong> (<em>Shape(tuple), optional, default=[]</em>) – Pad for pooling: (y, x) or (d, y, x). Defaults to no padding.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Pooling_v1">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Pooling_v1</code><span class="sig-paren">(</span><em>data=None</em>, <em>global_pool=_Null</em>, <em>kernel=_Null</em>, <em>pool_type=_Null</em>, <em>pooling_convention=_Null</em>, <em>stride=_Null</em>, <em>pad=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Pooling_v1" title="Permalink to this definition"></a></dt>
<dd><p>This operator is DEPRECATED.
Perform pooling on the input.</p>
<p>The shapes for 2-D pooling is</p>
<ul>
<li><p class="first"><strong>data</strong>: <em>(batch_size, channel, height, width)</em></p>
</li>
<li><p class="first"><strong>out</strong>: <em>(batch_size, num_filter, out_height, out_width)</em>, with:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">out_height</span> <span class="o">=</span> <span class="n">f</span><span class="p">(</span><span class="n">height</span><span class="p">,</span> <span class="n">kernel</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">pad</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">stride</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">out_width</span> <span class="o">=</span> <span class="n">f</span><span class="p">(</span><span class="n">width</span><span class="p">,</span> <span class="n">kernel</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">pad</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">stride</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
</pre></div>
</div>
</li>
</ul>
<p>The definition of <em>f</em> depends on <code class="docutils literal"><span class="pre">pooling_convention</span></code>, which has two options:</p>
<ul>
<li><p class="first"><strong>valid</strong> (default):</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">f</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">k</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">s</span><span class="p">)</span> <span class="o">=</span> <span class="n">floor</span><span class="p">((</span><span class="n">x</span><span class="o">+</span><span class="mi">2</span><span class="o">*</span><span class="n">p</span><span class="o">-</span><span class="n">k</span><span class="p">)</span><span class="o">/</span><span class="n">s</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span>
</pre></div>
</div>
</li>
<li><p class="first"><strong>full</strong>, which is compatible with Caffe:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">f</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">k</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">s</span><span class="p">)</span> <span class="o">=</span> <span class="n">ceil</span><span class="p">((</span><span class="n">x</span><span class="o">+</span><span class="mi">2</span><span class="o">*</span><span class="n">p</span><span class="o">-</span><span class="n">k</span><span class="p">)</span><span class="o">/</span><span class="n">s</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span>
</pre></div>
</div>
</li>
</ul>
<p>But <code class="docutils literal"><span class="pre">global_pool</span></code> is set to be true, then do a global pooling, namely reset
<code class="docutils literal"><span class="pre">kernel=(height,</span> <span class="pre">width)</span></code>.</p>
<p>Three pooling options are supported by <code class="docutils literal"><span class="pre">pool_type</span></code>:</p>
<ul class="simple">
<li><strong>avg</strong>: average pooling</li>
<li><strong>max</strong>: max pooling</li>
<li><strong>sum</strong>: sum pooling</li>
</ul>
<p>1-D pooling is special case of 2-D pooling with <em>weight=1</em> and
<em>kernel[1]=1</em>.</p>
<p>For 3-D pooling, an additional <em>depth</em> dimension is added before
<em>height</em>. Namely the input data will have shape <em>(batch_size, channel, depth,
height, width)</em>.</p>
<p>Defined in src/operator/pooling_v1.cc:L104</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to the pooling operator.</li>
<li><strong>global_pool</strong> (<em>boolean, optional, default=0</em>) – Ignore kernel size, do global pooling based on current input feature map.</li>
<li><strong>kernel</strong> (<em>Shape(tuple), required</em>) – pooling kernel size: (y, x) or (d, y, x)</li>
<li><strong>pool_type</strong> (<em>{'avg', 'max', 'sum'}, required</em>) – Pooling type to be applied.</li>
<li><strong>pooling_convention</strong> (<em>{'full', 'valid'},optional, default='valid'</em>) – Pooling convention to be applied.</li>
<li><strong>stride</strong> (<em>Shape(tuple), optional, default=[]</em>) – stride: for pooling (y, x) or (d, y, x)</li>
<li><strong>pad</strong> (<em>Shape(tuple), optional, default=[]</em>) – pad for pooling: (y, x) or (d, y, x)</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.RNN">
<code class="descclassname">mxnet.symbol.</code><code class="descname">RNN</code><span class="sig-paren">(</span><em>data=None</em>, <em>parameters=None</em>, <em>state=None</em>, <em>state_cell=None</em>, <em>state_size=_Null</em>, <em>num_layers=_Null</em>, <em>bidirectional=_Null</em>, <em>mode=_Null</em>, <em>p=_Null</em>, <em>state_outputs=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.RNN" title="Permalink to this definition"></a></dt>
<dd><p>Applies a recurrent layer to input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to RNN</li>
<li><strong>parameters</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Vector of all RNN trainable parameters concatenated</li>
<li><strong>state</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – initial hidden state of the RNN</li>
<li><strong>state_cell</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – initial cell state for LSTM networks (only for LSTM)</li>
<li><strong>state_size</strong> (<em>int (non-negative), required</em>) – size of the state for each layer</li>
<li><strong>num_layers</strong> (<em>int (non-negative), required</em>) – number of stacked layers</li>
<li><strong>bidirectional</strong> (<em>boolean, optional, default=0</em>) – whether to use bidirectional recurrent layers</li>
<li><strong>mode</strong> (<em>{'gru', 'lstm', 'rnn_relu', 'rnn_tanh'}, required</em>) – the type of RNN to compute</li>
<li><strong>p</strong> (<em>float, optional, default=0</em>) – Dropout probability, fraction of the input that gets dropped out at training time</li>
<li><strong>state_outputs</strong> (<em>boolean, optional, default=0</em>) – Whether to have the states as symbol outputs.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.ROIPooling">
<code class="descclassname">mxnet.symbol.</code><code class="descname">ROIPooling</code><span class="sig-paren">(</span><em>data=None</em>, <em>rois=None</em>, <em>pooled_size=_Null</em>, <em>spatial_scale=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.ROIPooling" title="Permalink to this definition"></a></dt>
<dd><p>Performs region of interest(ROI) pooling on the input array.</p>
<p>ROI pooling is a variant of a max pooling layer, in which the output size is fixed and
region of interest is a parameter. Its purpose is to perform max pooling on the inputs
of non-uniform sizes to obtain fixed-size feature maps. ROI pooling is a neural-net
layer mostly used in training a <cite>Fast R-CNN</cite> network for object detection.</p>
<p>This operator takes a 4D feature map as an input array and region proposals as <cite>rois</cite>,
then it pools over sub-regions of input and produces a fixed-sized output array
regardless of the ROI size.</p>
<p>To crop the feature map accordingly, you can resize the bounding box coordinates
by changing the parameters <cite>rois</cite> and <cite>spatial_scale</cite>.</p>
<p>The cropped feature maps are pooled by standard max pooling operation to a fixed size output
indicated by a <cite>pooled_size</cite> parameter. batch_size will change to the number of region
bounding boxes after <cite>ROIPooling</cite>.</p>
<p>The size of each region of interest doesn’t have to be perfectly divisible by
the number of pooling sections(<cite>pooled_size</cite>).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[[[ 0., 1., 2., 3., 4., 5.],
[ 6., 7., 8., 9., 10., 11.],
[ 12., 13., 14., 15., 16., 17.],
[ 18., 19., 20., 21., 22., 23.],
[ 24., 25., 26., 27., 28., 29.],
[ 30., 31., 32., 33., 34., 35.],
[ 36., 37., 38., 39., 40., 41.],
[ 42., 43., 44., 45., 46., 47.]]]]
// region of interest i.e. bounding box coordinates.
y = [[0,0,0,4,4]]
// returns array of shape (2,2) according to the given roi with max pooling.
ROIPooling(x, y, (2,2), 1.0) = [[[[ 14., 16.],
[ 26., 28.]]]]
// region of interest is changed due to the change in `spacial_scale` parameter.
ROIPooling(x, y, (2,2), 0.7) = [[[[ 7., 9.],
[ 19., 21.]]]]
</pre></div>
</div>
<p>Defined in src/operator/roi_pooling.cc:L287</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array to the pooling operator, a 4D Feature maps</li>
<li><strong>rois</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Bounding box coordinates, a 2D array of [[batch_index, x1, y1, x2, y2]], where (x1, y1) and (x2, y2) are top left and bottom right corners of designated region of interest. <cite>batch_index</cite> indicates the index of corresponding image in the input array</li>
<li><strong>pooled_size</strong> (<em>Shape(tuple), required</em>) – ROI pooling output shape (h,w)</li>
<li><strong>spatial_scale</strong> (<em>float, required</em>) – Ratio of input feature map height (or w) to raw image height (or w). Equals the reciprocal of total stride in convolutional layers</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Reshape">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Reshape</code><span class="sig-paren">(</span><em>data=None</em>, <em>shape=_Null</em>, <em>reverse=_Null</em>, <em>target_shape=_Null</em>, <em>keep_highest=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Reshape" title="Permalink to this definition"></a></dt>
<dd><p>Reshapes the input array.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">Reshape</span></code> is deprecated, use <code class="docutils literal"><span class="pre">reshape</span></code></p>
</div>
<p>Given an array and a shape, this function returns a copy of the array in the new shape.
The shape is a tuple of integers such as (2,3,4).The size of the new shape should be same as the size of the input array.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">reshape</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">],</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">],</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]]</span>
</pre></div>
</div>
<p>Some dimensions of the shape can take special values from the set {0, -1, -2, -3, -4}. The significance of each is explained below:</p>
<ul>
<li><p class="first"><code class="docutils literal"><span class="pre">0</span></code> copy this dimension from the input to the output shape.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- input shape = (2,3,4), shape = (4,0,2), output shape = (4,3,2)
- input shape = (2,3,4), shape = (2,0,0), output shape = (2,3,4)
</pre></div>
</div>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">-1</span></code> infers the dimension of the output shape by using the remainder of the input dimensions
keeping the size of the new array same as that of the input array.
At most one dimension of shape can be -1.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- input shape = (2,3,4), shape = (6,1,-1), output shape = (6,1,4)
- input shape = (2,3,4), shape = (3,-1,8), output shape = (3,1,8)
- input shape = (2,3,4), shape=(-1,), output shape = (24,)
</pre></div>
</div>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">-2</span></code> copy all/remainder of the input dimensions to the output shape.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- input shape = (2,3,4), shape = (-2,), output shape = (2,3,4)
- input shape = (2,3,4), shape = (2,-2), output shape = (2,3,4)
- input shape = (2,3,4), shape = (-2,1,1), output shape = (2,3,4,1,1)
</pre></div>
</div>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">-3</span></code> use the product of two consecutive dimensions of the input shape as the output dimension.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- input shape = (2,3,4), shape = (-3,4), output shape = (6,4)
- input shape = (2,3,4,5), shape = (-3,-3), output shape = (6,20)
- input shape = (2,3,4), shape = (0,-3), output shape = (2,12)
- input shape = (2,3,4), shape = (-3,-2), output shape = (6,4)
</pre></div>
</div>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">-4</span></code> split one dimension of the input into two dimensions passed subsequent to -4 in shape (can contain -1).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- input shape = (2,3,4), shape = (-4,1,2,-2), output shape =(1,2,3,4)
- input shape = (2,3,4), shape = (2,-4,-1,3,-2), output shape = (2,1,3,4)
</pre></div>
</div>
</li>
</ul>
<p>If the argument <cite>reverse</cite> is set to 1, then the special values are inferred from right to left.</p>
<blockquote>
<div><p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- without reverse=1, for input shape = (10,5,4), shape = (-1,0), output shape would be (40,5)
- with reverse=1, output shape will be (50,4).
</pre></div>
</div>
</div></blockquote>
<p>Defined in src/operator/tensor/matrix_op.cc:L167</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to reshape.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – The target shape</li>
<li><strong>reverse</strong> (<em>boolean, optional, default=0</em>) – If true then the special values are inferred from right to left</li>
<li><strong>target_shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – (Deprecated! Use <code class="docutils literal"><span class="pre">shape</span></code> instead.) Target new shape. One and only one dim can be 0, in which case it will be inferred from the rest of dims</li>
<li><strong>keep_highest</strong> (<em>boolean, optional, default=0</em>) – (Deprecated! Use <code class="docutils literal"><span class="pre">shape</span></code> instead.) Whether keep the highest dim unchanged.If set to true, then the first dim in target_shape is ignored,and always fixed as input</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.SVMOutput">
<code class="descclassname">mxnet.symbol.</code><code class="descname">SVMOutput</code><span class="sig-paren">(</span><em>data=None</em>, <em>label=None</em>, <em>margin=_Null</em>, <em>regularization_coefficient=_Null</em>, <em>use_linear=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.SVMOutput" title="Permalink to this definition"></a></dt>
<dd><p>Computes support vector machine based transformation of the input.</p>
<p>This tutorial demonstrates using SVM as output layer for classification instead of softmax:
<a class="reference external" href="https://github.com/dmlc/mxnet/tree/master/example/svm_mnist">https://github.com/dmlc/mxnet/tree/master/example/svm_mnist</a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data for SVM transformation.</li>
<li><strong>label</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Class label for the input data.</li>
<li><strong>margin</strong> (<em>float, optional, default=1</em>) – The loss function penalizes outputs that lie outside this margin. Default margin is 1.</li>
<li><strong>regularization_coefficient</strong> (<em>float, optional, default=1</em>) – Regularization parameter for the SVM. This balances the tradeoff between coefficient size and error.</li>
<li><strong>use_linear</strong> (<em>boolean, optional, default=0</em>) – Whether to use L1-SVM objective. L2-SVM objective is used by default.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.SequenceLast">
<code class="descclassname">mxnet.symbol.</code><code class="descname">SequenceLast</code><span class="sig-paren">(</span><em>data=None</em>, <em>sequence_length=None</em>, <em>use_sequence_length=_Null</em>, <em>axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.SequenceLast" title="Permalink to this definition"></a></dt>
<dd><p>Takes the last element of a sequence.</p>
<p>This function takes an n-dimensional input array of the form
[max_sequence_length, batch_size, other_feature_dims] and returns a (n-1)-dimensional array
of the form [batch_size, other_feature_dims].</p>
<p>Parameter <cite>sequence_length</cite> is used to handle variable-length sequences. <cite>sequence_length</cite> should be
an input array of positive ints of dimension [batch_size]. To use this parameter,
set <cite>use_sequence_length</cite> to <cite>True</cite>, otherwise each example in the batch is assumed
to have the max sequence length.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Alternatively, you can also use <cite>take</cite> operator.</p>
</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[[ 1., 2., 3.],
[ 4., 5., 6.],
[ 7., 8., 9.]],
[[ 10., 11., 12.],
[ 13., 14., 15.],
[ 16., 17., 18.]],
[[ 19., 20., 21.],
[ 22., 23., 24.],
[ 25., 26., 27.]]]
// returns last sequence when sequence_length parameter is not used
SequenceLast(x) = [[ 19., 20., 21.],
[ 22., 23., 24.],
[ 25., 26., 27.]]
// sequence_length is used
SequenceLast(x, sequence_length=[1,1,1], use_sequence_length=True) =
[[ 1., 2., 3.],
[ 4., 5., 6.],
[ 7., 8., 9.]]
// sequence_length is used
SequenceLast(x, sequence_length=[1,2,3], use_sequence_length=True) =
[[ 1., 2., 3.],
[ 13., 14., 15.],
[ 25., 26., 27.]]
</pre></div>
</div>
<p>Defined in src/operator/sequence_last.cc:L92</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – n-dimensional input array of the form [max_sequence_length, batch_size, other_feature_dims] where n>2</li>
<li><strong>sequence_length</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – vector of sequence lengths of the form [batch_size]</li>
<li><strong>use_sequence_length</strong> (<em>boolean, optional, default=0</em>) – If set to true, this layer takes in an extra input parameter <cite>sequence_length</cite> to specify variable length sequence</li>
<li><strong>axis</strong> (<em>int, optional, default='0'</em>) – The sequence axis. Only values of 0 and 1 are currently supported.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.SequenceMask">
<code class="descclassname">mxnet.symbol.</code><code class="descname">SequenceMask</code><span class="sig-paren">(</span><em>data=None</em>, <em>sequence_length=None</em>, <em>use_sequence_length=_Null</em>, <em>value=_Null</em>, <em>axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.SequenceMask" title="Permalink to this definition"></a></dt>
<dd><p>Sets all elements outside the sequence to a constant value.</p>
<p>This function takes an n-dimensional input array of the form
[max_sequence_length, batch_size, other_feature_dims] and returns an array of the same shape.</p>
<p>Parameter <cite>sequence_length</cite> is used to handle variable-length sequences. <cite>sequence_length</cite>
should be an input array of positive ints of dimension [batch_size].
To use this parameter, set <cite>use_sequence_length</cite> to <cite>True</cite>,
otherwise each example in the batch is assumed to have the max sequence length and
this operator works as the <cite>identity</cite> operator.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[[ 1., 2., 3.],
[ 4., 5., 6.]],
[[ 7., 8., 9.],
[ 10., 11., 12.]],
[[ 13., 14., 15.],
[ 16., 17., 18.]]]
// Batch 1
B1 = [[ 1., 2., 3.],
[ 7., 8., 9.],
[ 13., 14., 15.]]
// Batch 2
B2 = [[ 4., 5., 6.],
[ 10., 11., 12.],
[ 16., 17., 18.]]
// works as identity operator when sequence_length parameter is not used
SequenceMask(x) = [[[ 1., 2., 3.],
[ 4., 5., 6.]],
[[ 7., 8., 9.],
[ 10., 11., 12.]],
[[ 13., 14., 15.],
[ 16., 17., 18.]]]
// sequence_length [1,1] means 1 of each batch will be kept
// and other rows are masked with default mask value = 0
SequenceMask(x, sequence_length=[1,1], use_sequence_length=True) =
[[[ 1., 2., 3.],
[ 4., 5., 6.]],
[[ 0., 0., 0.],
[ 0., 0., 0.]],
[[ 0., 0., 0.],
[ 0., 0., 0.]]]
// sequence_length [2,3] means 2 of batch B1 and 3 of batch B2 will be kept
// and other rows are masked with value = 1
SequenceMask(x, sequence_length=[2,3], use_sequence_length=True, value=1) =
[[[ 1., 2., 3.],
[ 4., 5., 6.]],
[[ 7., 8., 9.],
[ 10., 11., 12.]],
[[ 1., 1., 1.],
[ 16., 17., 18.]]]
</pre></div>
</div>
<p>Defined in src/operator/sequence_mask.cc:L114</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – n-dimensional input array of the form [max_sequence_length, batch_size, other_feature_dims] where n>2</li>
<li><strong>sequence_length</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – vector of sequence lengths of the form [batch_size]</li>
<li><strong>use_sequence_length</strong> (<em>boolean, optional, default=0</em>) – If set to true, this layer takes in an extra input parameter <cite>sequence_length</cite> to specify variable length sequence</li>
<li><strong>value</strong> (<em>float, optional, default=0</em>) – The value to be used as a mask.</li>
<li><strong>axis</strong> (<em>int, optional, default='0'</em>) – The sequence axis. Only values of 0 and 1 are currently supported.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.SequenceReverse">
<code class="descclassname">mxnet.symbol.</code><code class="descname">SequenceReverse</code><span class="sig-paren">(</span><em>data=None</em>, <em>sequence_length=None</em>, <em>use_sequence_length=_Null</em>, <em>axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.SequenceReverse" title="Permalink to this definition"></a></dt>
<dd><p>Reverses the elements of each sequence.</p>
<p>This function takes an n-dimensional input array of the form [max_sequence_length, batch_size, other_feature_dims]
and returns an array of the same shape.</p>
<p>Parameter <cite>sequence_length</cite> is used to handle variable-length sequences.
<cite>sequence_length</cite> should be an input array of positive ints of dimension [batch_size].
To use this parameter, set <cite>use_sequence_length</cite> to <cite>True</cite>,
otherwise each example in the batch is assumed to have the max sequence length.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[[ 1., 2., 3.],
[ 4., 5., 6.]],
[[ 7., 8., 9.],
[ 10., 11., 12.]],
[[ 13., 14., 15.],
[ 16., 17., 18.]]]
// Batch 1
B1 = [[ 1., 2., 3.],
[ 7., 8., 9.],
[ 13., 14., 15.]]
// Batch 2
B2 = [[ 4., 5., 6.],
[ 10., 11., 12.],
[ 16., 17., 18.]]
// returns reverse sequence when sequence_length parameter is not used
SequenceReverse(x) = [[[ 13., 14., 15.],
[ 16., 17., 18.]],
[[ 7., 8., 9.],
[ 10., 11., 12.]],
[[ 1., 2., 3.],
[ 4., 5., 6.]]]
// sequence_length [2,2] means 2 rows of
// both batch B1 and B2 will be reversed.
SequenceReverse(x, sequence_length=[2,2], use_sequence_length=True) =
[[[ 7., 8., 9.],
[ 10., 11., 12.]],
[[ 1., 2., 3.],
[ 4., 5., 6.]],
[[ 13., 14., 15.],
[ 16., 17., 18.]]]
// sequence_length [2,3] means 2 of batch B2 and 3 of batch B3
// will be reversed.
SequenceReverse(x, sequence_length=[2,3], use_sequence_length=True) =
[[[ 7., 8., 9.],
[ 16., 17., 18.]],
[[ 1., 2., 3.],
[ 10., 11., 12.]],
[[ 13., 14, 15.],
[ 4., 5., 6.]]]
</pre></div>
</div>
<p>Defined in src/operator/sequence_reverse.cc:L113</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – n-dimensional input array of the form [max_sequence_length, batch_size, other dims] where n>2</li>
<li><strong>sequence_length</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – vector of sequence lengths of the form [batch_size]</li>
<li><strong>use_sequence_length</strong> (<em>boolean, optional, default=0</em>) – If set to true, this layer takes in an extra input parameter <cite>sequence_length</cite> to specify variable length sequence</li>
<li><strong>axis</strong> (<em>int, optional, default='0'</em>) – The sequence axis. Only 0 is currently supported.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.SliceChannel">
<code class="descclassname">mxnet.symbol.</code><code class="descname">SliceChannel</code><span class="sig-paren">(</span><em>data=None</em>, <em>num_outputs=_Null</em>, <em>axis=_Null</em>, <em>squeeze_axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.SliceChannel" title="Permalink to this definition"></a></dt>
<dd><p>Splits an array along a particular axis into multiple sub-arrays.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">SliceChannel</span></code> is deprecated. Use <code class="docutils literal"><span class="pre">split</span></code> instead.</p>
</div>
<p><strong>Note</strong> that <cite>num_outputs</cite> should evenly divide the length of the axis
along which to split the array.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[[ 1.]
[ 2.]]
[[ 3.]
[ 4.]]
[[ 5.]
[ 6.]]]
x.shape = (3, 2, 1)
y = split(x, axis=1, num_outputs=2) // a list of 2 arrays with shape (3, 1, 1)
y = [[[ 1.]]
[[ 3.]]
[[ 5.]]]
[[[ 2.]]
[[ 4.]]
[[ 6.]]]
y[0].shape = (3, 1, 1)
z = split(x, axis=0, num_outputs=3) // a list of 3 arrays with shape (1, 2, 1)
z = [[[ 1.]
[ 2.]]]
[[[ 3.]
[ 4.]]]
[[[ 5.]
[ 6.]]]
z[0].shape = (1, 2, 1)
</pre></div>
</div>
<p><cite>squeeze_axis=1</cite> removes the axis with length 1 from the shapes of the output arrays.
<strong>Note</strong> that setting <cite>squeeze_axis</cite> to <code class="docutils literal"><span class="pre">1</span></code> removes axis with length 1 only
along the <cite>axis</cite> which it is split.
Also <cite>squeeze_axis</cite> can be set to true only if <code class="docutils literal"><span class="pre">input.shape[axis]</span> <span class="pre">==</span> <span class="pre">num_outputs</span></code>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>z = split(x, axis=0, num_outputs=3, squeeze_axis=1) // a list of 3 arrays with shape (2, 1)
z = [[ 1.]
[ 2.]]
[[ 3.]
[ 4.]]
[[ 5.]
[ 6.]]
z[0].shape = (2 ,1 )
</pre></div>
</div>
<p>Defined in src/operator/slice_channel.cc:L107</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>num_outputs</strong> (<em>int, required</em>) – Number of splits. Note that this should evenly divide the length of the <cite>axis</cite>.</li>
<li><strong>axis</strong> (<em>int, optional, default='1'</em>) – Axis along which to split.</li>
<li><strong>squeeze_axis</strong> (<em>boolean, optional, default=0</em>) – If true, Removes the axis with length 1 from the shapes of the output arrays. <strong>Note</strong> that setting <cite>squeeze_axis</cite> to <code class="docutils literal"><span class="pre">true</span></code> removes axis with length 1 only along the <cite>axis</cite> which it is split. Also <cite>squeeze_axis</cite> can be set to <code class="docutils literal"><span class="pre">true</span></code> only if <code class="docutils literal"><span class="pre">input.shape[axis]</span> <span class="pre">==</span> <span class="pre">num_outputs</span></code>.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Softmax">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Softmax</code><span class="sig-paren">(</span><em>data=None</em>, <em>grad_scale=_Null</em>, <em>ignore_label=_Null</em>, <em>multi_output=_Null</em>, <em>use_ignore=_Null</em>, <em>preserve_shape=_Null</em>, <em>normalization=_Null</em>, <em>out_grad=_Null</em>, <em>smooth_alpha=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Softmax" title="Permalink to this definition"></a></dt>
<dd><p>Please use <cite>SoftmaxOutput</cite>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This operator has been renamed to <cite>SoftmaxOutput</cite>, which
computes the gradient of cross-entropy loss w.r.t softmax output.
To just compute softmax output, use the <cite>softmax</cite> operator.</p>
</div>
<p>Defined in src/operator/softmax_output.cc:L138</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input array.</li>
<li><strong>grad_scale</strong> (<em>float, optional, default=1</em>) – Scales the gradient by a float factor.</li>
<li><strong>ignore_label</strong> (<em>float, optional, default=-1</em>) – The instances whose <cite>labels</cite> == <cite>ignore_label</cite> will be ignored during backward, if <cite>use_ignore</cite> is set to <code class="docutils literal"><span class="pre">true</span></code>).</li>
<li><strong>multi_output</strong> (<em>boolean, optional, default=0</em>) – If set to <code class="docutils literal"><span class="pre">true</span></code>, the softmax function will be computed along axis <code class="docutils literal"><span class="pre">1</span></code>. This is applied when the shape of input array differs from the shape of label array.</li>
<li><strong>use_ignore</strong> (<em>boolean, optional, default=0</em>) – If set to <code class="docutils literal"><span class="pre">true</span></code>, the <cite>ignore_label</cite> value will not contribute to the backward gradient.</li>
<li><strong>preserve_shape</strong> (<em>boolean, optional, default=0</em>) – If set to <code class="docutils literal"><span class="pre">true</span></code>, the softmax function will be computed along the last axis (<code class="docutils literal"><span class="pre">-1</span></code>).</li>
<li><strong>normalization</strong> (<em>{'batch', 'null', 'valid'},optional, default='null'</em>) – Normalizes the gradient.</li>
<li><strong>out_grad</strong> (<em>boolean, optional, default=0</em>) – Multiplies gradient with output gradient element-wise.</li>
<li><strong>smooth_alpha</strong> (<em>float, optional, default=0</em>) – Constant for computing a label smoothed version of cross-entropyfor the backwards pass. This constant gets subtracted from theone-hot encoding of the gold label and distributed uniformly toall other labels.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.SoftmaxActivation">
<code class="descclassname">mxnet.symbol.</code><code class="descname">SoftmaxActivation</code><span class="sig-paren">(</span><em>data=None</em>, <em>mode=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.SoftmaxActivation" title="Permalink to this definition"></a></dt>
<dd><p>Applies softmax activation to input. This is intended for internal layers.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This operator has been deprecated, please use <cite>softmax</cite>.</p>
</div>
<p>If <cite>mode</cite> = <code class="docutils literal"><span class="pre">instance</span></code>, this operator will compute a softmax for each instance in the batch.
This is the default mode.</p>
<p>If <cite>mode</cite> = <code class="docutils literal"><span class="pre">channel</span></code>, this operator will compute a k-class softmax at each position
of each instance, where <cite>k</cite> = <code class="docutils literal"><span class="pre">num_channel</span></code>. This mode can only be used when the input array
has at least 3 dimensions.
This can be used for <cite>fully convolutional network</cite>, <cite>image segmentation</cite>, etc.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">input_array</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mf">3.</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">],</span>
<span class="gp">>>> </span> <span class="p">[</span><span class="mf">2.</span><span class="p">,</span> <span class="o">-.</span><span class="mi">4</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">0.2</span><span class="p">]])</span>
<span class="gp">>>> </span><span class="n">softmax_act</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">SoftmaxActivation</span><span class="p">(</span><span class="n">input_array</span><span class="p">)</span>
<span class="gp">>>> </span><span class="k">print</span> <span class="n">softmax_act</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">[[ 1.78322066e-02 1.46375655e-03 5.38485940e-04 6.56010211e-03 9.73605454e-01]</span>
<span class="go"> [ 6.56221947e-03 5.95310994e-04 9.73919690e-01 1.78379621e-02 1.08472735e-03]]</span>
</pre></div>
</div>
<p>Defined in src/operator/nn/softmax_activation.cc:L59</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>mode</strong> (<em>{'channel', 'instance'},optional, default='instance'</em>) – Specifies how to compute the softmax. If set to <code class="docutils literal"><span class="pre">instance</span></code>, it computes softmax for each instance. If set to <code class="docutils literal"><span class="pre">channel</span></code>, It computes cross channel softmax for each position of each instance.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.SoftmaxOutput">
<code class="descclassname">mxnet.symbol.</code><code class="descname">SoftmaxOutput</code><span class="sig-paren">(</span><em>data=None</em>, <em>label=None</em>, <em>grad_scale=_Null</em>, <em>ignore_label=_Null</em>, <em>multi_output=_Null</em>, <em>use_ignore=_Null</em>, <em>preserve_shape=_Null</em>, <em>normalization=_Null</em>, <em>out_grad=_Null</em>, <em>smooth_alpha=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.SoftmaxOutput" title="Permalink to this definition"></a></dt>
<dd><p>Computes the gradient of cross entropy loss with respect to softmax output.</p>
<ul>
<li><p class="first">This operator computes the gradient in two steps.
The cross entropy loss does not actually need to be computed.</p>
<ul class="simple">
<li>Applies softmax function on the input array.</li>
<li>Computes and returns the gradient of cross entropy loss w.r.t. the softmax output.</li>
</ul>
</li>
<li><p class="first">The softmax function, cross entropy loss and gradient is given by:</p>
<ul>
<li><p class="first">Softmax Function:</p>
<div class="math">
\[\text{softmax}(x)_i = \frac{exp(x_i)}{\sum_j exp(x_j)}\]</div>
</li>
<li><p class="first">Cross Entropy Function:</p>
<div class="math">
\[\text{CE(label, output)} = - \sum_i \text{label}_i \log(\text{output}_i)\]</div>
</li>
<li><p class="first">The gradient of cross entropy loss w.r.t softmax output:</p>
<div class="math">
\[\text{gradient} = \text{output} - \text{label}\]</div>
</li>
</ul>
</li>
<li><p class="first">During forward propagation, the softmax function is computed for each instance in the input array.</p>
<p>For general <em>N</em>-D input arrays with shape <span class="math">\((d_1, d_2, ..., d_n)\)</span>. The size is
<span class="math">\(s=d_1 \cdot d_2 \cdot \cdot \cdot d_n\)</span>. We can use the parameters <cite>preserve_shape</cite>
and <cite>multi_output</cite> to specify the way to compute softmax:</p>
<ul class="simple">
<li>By default, <cite>preserve_shape</cite> is <code class="docutils literal"><span class="pre">false</span></code>. This operator will reshape the input array
into a 2-D array with shape <span class="math">\((d_1, \frac{s}{d_1})\)</span> and then compute the softmax function for
each row in the reshaped array, and afterwards reshape it back to the original shape
<span class="math">\((d_1, d_2, ..., d_n)\)</span>.</li>
<li>If <cite>preserve_shape</cite> is <code class="docutils literal"><span class="pre">true</span></code>, the softmax function will be computed along
the last axis (<cite>axis</cite> = <code class="docutils literal"><span class="pre">-1</span></code>).</li>
<li>If <cite>multi_output</cite> is <code class="docutils literal"><span class="pre">true</span></code>, the softmax function will be computed along
the second axis (<cite>axis</cite> = <code class="docutils literal"><span class="pre">1</span></code>).</li>
</ul>
</li>
<li><p class="first">During backward propagation, the gradient of cross-entropy loss w.r.t softmax output array is computed.
The provided label can be a one-hot label array or a probability label array.</p>
<ul>
<li><p class="first">If the parameter <cite>use_ignore</cite> is <code class="docutils literal"><span class="pre">true</span></code>, <cite>ignore_label</cite> can specify input instances
with a particular label to be ignored during backward propagation. <strong>This has no effect when
softmax `output` has same shape as `label`</strong>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>data = [[1,2,3,4],[2,2,2,2],[3,3,3,3],[4,4,4,4]]
label = [1,0,2,3]
ignore_label = 1
SoftmaxOutput(data=data, label = label,\
multi_output=true, use_ignore=true,\
ignore_label=ignore_label)
## forward softmax output
[[ 0.0320586 0.08714432 0.23688284 0.64391428]
[ 0.25 0.25 0.25 0.25 ]
[ 0.25 0.25 0.25 0.25 ]
[ 0.25 0.25 0.25 0.25 ]]
## backward gradient output
[[ 0. 0. 0. 0. ]
[-0.75 0.25 0.25 0.25]
[ 0.25 0.25 -0.75 0.25]
[ 0.25 0.25 0.25 -0.75]]
## notice that the first row is all 0 because label[0] is 1, which is equal to ignore_label.
</pre></div>
</div>
</li>
<li><p class="first">The parameter <cite>grad_scale</cite> can be used to rescale the gradient, which is often used to
give each loss function different weights.</p>
</li>
<li><p class="first">This operator also supports various ways to normalize the gradient by <cite>normalization</cite>,
The <cite>normalization</cite> is applied if softmax output has different shape than the labels.
The <cite>normalization</cite> mode can be set to the followings:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">'null'</span></code>: do nothing.</li>
<li><code class="docutils literal"><span class="pre">'batch'</span></code>: divide the gradient by the batch size.</li>
<li><code class="docutils literal"><span class="pre">'valid'</span></code>: divide the gradient by the number of instances which are not ignored.</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>Defined in src/operator/softmax_output.cc:L123</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input array.</li>
<li><strong>label</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Ground truth label.</li>
<li><strong>grad_scale</strong> (<em>float, optional, default=1</em>) – Scales the gradient by a float factor.</li>
<li><strong>ignore_label</strong> (<em>float, optional, default=-1</em>) – The instances whose <cite>labels</cite> == <cite>ignore_label</cite> will be ignored during backward, if <cite>use_ignore</cite> is set to <code class="docutils literal"><span class="pre">true</span></code>).</li>
<li><strong>multi_output</strong> (<em>boolean, optional, default=0</em>) – If set to <code class="docutils literal"><span class="pre">true</span></code>, the softmax function will be computed along axis <code class="docutils literal"><span class="pre">1</span></code>. This is applied when the shape of input array differs from the shape of label array.</li>
<li><strong>use_ignore</strong> (<em>boolean, optional, default=0</em>) – If set to <code class="docutils literal"><span class="pre">true</span></code>, the <cite>ignore_label</cite> value will not contribute to the backward gradient.</li>
<li><strong>preserve_shape</strong> (<em>boolean, optional, default=0</em>) – If set to <code class="docutils literal"><span class="pre">true</span></code>, the softmax function will be computed along the last axis (<code class="docutils literal"><span class="pre">-1</span></code>).</li>
<li><strong>normalization</strong> (<em>{'batch', 'null', 'valid'},optional, default='null'</em>) – Normalizes the gradient.</li>
<li><strong>out_grad</strong> (<em>boolean, optional, default=0</em>) – Multiplies gradient with output gradient element-wise.</li>
<li><strong>smooth_alpha</strong> (<em>float, optional, default=0</em>) – Constant for computing a label smoothed version of cross-entropyfor the backwards pass. This constant gets subtracted from theone-hot encoding of the gold label and distributed uniformly toall other labels.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.SpatialTransformer">
<code class="descclassname">mxnet.symbol.</code><code class="descname">SpatialTransformer</code><span class="sig-paren">(</span><em>data=None</em>, <em>loc=None</em>, <em>target_shape=_Null</em>, <em>transform_type=_Null</em>, <em>sampler_type=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.SpatialTransformer" title="Permalink to this definition"></a></dt>
<dd><p>Applies a spatial transformer to input feature map.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to the SpatialTransformerOp.</li>
<li><strong>loc</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – localisation net, the output dim should be 6 when transform_type is affine. You shold initialize the weight and bias with identity tranform.</li>
<li><strong>target_shape</strong> (<em>Shape(tuple), optional, default=[0,0]</em>) – output shape(h, w) of spatial transformer: (y, x)</li>
<li><strong>transform_type</strong> (<em>{'affine'}, required</em>) – transformation type</li>
<li><strong>sampler_type</strong> (<em>{'bilinear'}, required</em>) – sampling type</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.SwapAxis">
<code class="descclassname">mxnet.symbol.</code><code class="descname">SwapAxis</code><span class="sig-paren">(</span><em>data=None</em>, <em>dim1=_Null</em>, <em>dim2=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.SwapAxis" title="Permalink to this definition"></a></dt>
<dd><p>Interchanges two axes of an array.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span> x = [[1, 2, 3]])
swapaxes(x, 0, 1) = [[ 1],
[ 2],
[ 3]]
x = [[[ 0, 1],
[ 2, 3]],
[[ 4, 5],
[ 6, 7]]] // (2,2,2) array
swapaxes(x, 0, 2) = [[[ 0, 4],
[ 2, 6]],
[[ 1, 5],
[ 3, 7]]]
</pre></div>
</div>
<p>Defined in src/operator/swapaxis.cc:L70</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input array.</li>
<li><strong>dim1</strong> (<em>int (non-negative), optional, default=0</em>) – the first axis to be swapped.</li>
<li><strong>dim2</strong> (<em>int (non-negative), optional, default=0</em>) – the second axis to be swapped.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.UpSampling">
<code class="descclassname">mxnet.symbol.</code><code class="descname">UpSampling</code><span class="sig-paren">(</span><em>*data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.UpSampling" title="Permalink to this definition"></a></dt>
<dd><p>Performs nearest neighbor/bilinear up sampling to inputs.
This function support variable length of positional input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<em>Symbol[]</em>) – Array of tensors to upsample</li>
<li><strong>scale</strong> (<em>int (non-negative), required</em>) – Up sampling scale</li>
<li><strong>num_filter</strong> (<em>int (non-negative), optional, default=0</em>) – Input filter. Only used by bilinear sample_type.</li>
<li><strong>sample_type</strong> (<em>{'bilinear', 'nearest'}, required</em>) – upsampling method</li>
<li><strong>multi_input_mode</strong> (<em>{'concat', 'sum'},optional, default='concat'</em>) – How to handle multiple input. concat means concatenate upsampled images along the channel dimension. sum means add all images together, only available for nearest neighbor upsampling.</li>
<li><strong>workspace</strong> (<em>long (non-negative), optional, default=512</em>) – Tmp workspace for deconvolution (MB)</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.abs">
<code class="descclassname">mxnet.symbol.</code><code class="descname">abs</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.abs" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise absolute value of the input.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="nb">abs</span><span class="p">([</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">3</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">3</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">abs</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>abs(default) = default</li>
<li>abs(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L460</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.adam_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">adam_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>mean=None</em>, <em>var=None</em>, <em>lr=_Null</em>, <em>beta1=_Null</em>, <em>beta2=_Null</em>, <em>epsilon=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.adam_update" title="Permalink to this definition"></a></dt>
<dd><p>Update function for Adam optimizer. Adam is seen as a generalization
of AdaGrad.</p>
<p>Adam update consists of the following steps, where g represents gradient and m, v
are 1st and 2nd order moment estimates (mean and variance).</p>
<div class="math">
\[\begin{split}g_t = \nabla J(W_{t-1})\\
m_t = \beta_1 m_{t-1} + (1 - \beta_1) g_t\\
v_t = \beta_2 v_{t-1} + (1 - \beta_2) g_t^2\\
W_t = W_{t-1} - \alpha \frac{ m_t }{ \sqrt{ v_t } + \epsilon }\end{split}\]</div>
<p>It updates the weights using:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">m</span> <span class="o">=</span> <span class="n">beta1</span><span class="o">*</span><span class="n">m</span> <span class="o">+</span> <span class="p">(</span><span class="mi">1</span><span class="o">-</span><span class="n">beta1</span><span class="p">)</span><span class="o">*</span><span class="n">grad</span>
<span class="n">v</span> <span class="o">=</span> <span class="n">beta2</span><span class="o">*</span><span class="n">v</span> <span class="o">+</span> <span class="p">(</span><span class="mi">1</span><span class="o">-</span><span class="n">beta2</span><span class="p">)</span><span class="o">*</span><span class="p">(</span><span class="n">grad</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span>
<span class="n">w</span> <span class="o">+=</span> <span class="o">-</span> <span class="n">learning_rate</span> <span class="o">*</span> <span class="n">m</span> <span class="o">/</span> <span class="p">(</span><span class="n">sqrt</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="o">+</span> <span class="n">epsilon</span><span class="p">)</span>
</pre></div>
</div>
<p>If w, m and v are all of <code class="docutils literal"><span class="pre">row_sparse</span></code> storage type,
only the row slices whose indices appear in grad.indices are updated (for w, m and v):</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">grad</span><span class="o">.</span><span class="n">indices</span><span class="p">:</span>
<span class="n">m</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">=</span> <span class="n">beta1</span><span class="o">*</span><span class="n">m</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">+</span> <span class="p">(</span><span class="mi">1</span><span class="o">-</span><span class="n">beta1</span><span class="p">)</span><span class="o">*</span><span class="n">grad</span><span class="p">[</span><span class="n">row</span><span class="p">]</span>
<span class="n">v</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">=</span> <span class="n">beta2</span><span class="o">*</span><span class="n">v</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">+</span> <span class="p">(</span><span class="mi">1</span><span class="o">-</span><span class="n">beta2</span><span class="p">)</span><span class="o">*</span><span class="p">(</span><span class="n">grad</span><span class="p">[</span><span class="n">row</span><span class="p">]</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span>
<span class="n">w</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">+=</span> <span class="o">-</span> <span class="n">learning_rate</span> <span class="o">*</span> <span class="n">m</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">/</span> <span class="p">(</span><span class="n">sqrt</span><span class="p">(</span><span class="n">v</span><span class="p">[</span><span class="n">row</span><span class="p">])</span> <span class="o">+</span> <span class="n">epsilon</span><span class="p">)</span>
</pre></div>
</div>
<p>Defined in src/operator/optimizer_op.cc:L383</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Gradient</li>
<li><strong>mean</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Moving mean</li>
<li><strong>var</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Moving variance</li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>beta1</strong> (<em>float, optional, default=0.9</em>) – The decay rate for the 1st moment estimates.</li>
<li><strong>beta2</strong> (<em>float, optional, default=0.999</em>) – The decay rate for the 2nd moment estimates.</li>
<li><strong>epsilon</strong> (<em>float, optional, default=1e-08</em>) – A small constant for numerical stability.</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.add_n">
<code class="descclassname">mxnet.symbol.</code><code class="descname">add_n</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.add_n" title="Permalink to this definition"></a></dt>
<dd><p>Adds all input arguments element-wise.</p>
<div class="math">
\[add\_n(a_1, a_2, ..., a_n) = a_1 + a_2 + ... + a_n\]</div>
<p><code class="docutils literal"><span class="pre">add_n</span></code> is potentially more efficient than calling <code class="docutils literal"><span class="pre">add</span></code> by <cite>n</cite> times.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">add_n</span></code> output depends on storage types of inputs</p>
<ul class="simple">
<li>add_n(row_sparse, row_sparse, ..) = row_sparse</li>
<li>otherwise, <code class="docutils literal"><span class="pre">add_n</span></code> generates output with default storage</li>
</ul>
<p>Defined in src/operator/tensor/elemwise_sum.cc:L159
This function support variable length of positional input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>args</strong> (<em>Symbol[]</em>) – Positional input arguments</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.arccos">
<code class="descclassname">mxnet.symbol.</code><code class="descname">arccos</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.arccos" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise inverse cosine of the input array.</p>
<p>The input should be in range <cite>[-1, 1]</cite>.
The output is in the closed interval <span class="math">\([0, \pi]\)</span></p>
<div class="math">
\[arccos([-1, -.707, 0, .707, 1]) = [\pi, 3\pi/4, \pi/2, \pi/4, 0]\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">arccos</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L123</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.arccosh">
<code class="descclassname">mxnet.symbol.</code><code class="descname">arccosh</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.arccosh" title="Permalink to this definition"></a></dt>
<dd><p>Returns the element-wise inverse hyperbolic cosine of the input array, computed element-wise.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">arccosh</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L264</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.arcsin">
<code class="descclassname">mxnet.symbol.</code><code class="descname">arcsin</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.arcsin" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise inverse sine of the input array.</p>
<p>The input should be in the range <cite>[-1, 1]</cite>.
The output is in the closed interval of [<span class="math">\(-\pi/2\)</span>, <span class="math">\(\pi/2\)</span>].</p>
<div class="math">
\[arcsin([-1, -.707, 0, .707, 1]) = [-\pi/2, -\pi/4, 0, \pi/4, \pi/2]\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">arcsin</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>arcsin(default) = default</li>
<li>arcsin(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L104</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.arcsinh">
<code class="descclassname">mxnet.symbol.</code><code class="descname">arcsinh</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.arcsinh" title="Permalink to this definition"></a></dt>
<dd><p>Returns the element-wise inverse hyperbolic sine of the input array, computed element-wise.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">arcsinh</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>arcsinh(default) = default</li>
<li>arcsinh(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L250</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.arctan">
<code class="descclassname">mxnet.symbol.</code><code class="descname">arctan</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.arctan" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise inverse tangent of the input array.</p>
<p>The output is in the closed interval <span class="math">\([-\pi/2, \pi/2]\)</span></p>
<div class="math">
\[arctan([-1, 0, 1]) = [-\pi/4, 0, \pi/4]\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">arctan</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>arctan(default) = default</li>
<li>arctan(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L144</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.arctanh">
<code class="descclassname">mxnet.symbol.</code><code class="descname">arctanh</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.arctanh" title="Permalink to this definition"></a></dt>
<dd><p>Returns the element-wise inverse hyperbolic tangent of the input array, computed element-wise.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">arctanh</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>arctanh(default) = default</li>
<li>arctanh(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L281</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.argmax">
<code class="descclassname">mxnet.symbol.</code><code class="descname">argmax</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.argmax" title="Permalink to this definition"></a></dt>
<dd><p>Returns indices of the maximum values along an axis.</p>
<p>In the case of multiple occurrences of maximum values, the indices corresponding to the first occurrence
are returned.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[ 0., 1., 2.],
[ 3., 4., 5.]]
// argmax along axis 0
argmax(x, axis=0) = [ 1., 1., 1.]
// argmax along axis 1
argmax(x, axis=1) = [ 2., 2.]
// argmax along axis 1 keeping same dims as an input array
argmax(x, axis=1, keepdims=True) = [[ 2.],
[ 2.]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/broadcast_reduce_op_index.cc:L52</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>int or None, optional, default='None'</em>) – The axis along which to perform the reduction. Negative values means indexing from right to left. <code class="docutils literal"><span class="pre">Requires</span> <span class="pre">axis</span> <span class="pre">to</span> <span class="pre">be</span> <span class="pre">set</span> <span class="pre">as</span> <span class="pre">int,</span> <span class="pre">because</span> <span class="pre">global</span> <span class="pre">reduction</span> <span class="pre">is</span> <span class="pre">not</span> <span class="pre">supported</span> <span class="pre">yet.</span></code></li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axis is left in the result as dimension with size one.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.argmax_channel">
<code class="descclassname">mxnet.symbol.</code><code class="descname">argmax_channel</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.argmax_channel" title="Permalink to this definition"></a></dt>
<dd><p>Returns argmax indices of each channel from the input array.</p>
<p>The result will be an NDArray of shape (num_channel,).</p>
<p>In case of multiple occurrences of the maximum values, the indices corresponding to the first occurrence
are returned.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">]]</span>
<span class="n">argmax_channel</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/broadcast_reduce_op_index.cc:L97</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.argmin">
<code class="descclassname">mxnet.symbol.</code><code class="descname">argmin</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.argmin" title="Permalink to this definition"></a></dt>
<dd><p>Returns indices of the minimum values along an axis.</p>
<p>In the case of multiple occurrences of minimum values, the indices corresponding to the first occurrence
are returned.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[ 0., 1., 2.],
[ 3., 4., 5.]]
// argmin along axis 0
argmin(x, axis=0) = [ 0., 0., 0.]
// argmin along axis 1
argmin(x, axis=1) = [ 0., 0.]
// argmin along axis 1 keeping same dims as an input array
argmin(x, axis=1, keepdims=True) = [[ 0.],
[ 0.]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/broadcast_reduce_op_index.cc:L77</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>int or None, optional, default='None'</em>) – The axis along which to perform the reduction. Negative values means indexing from right to left. <code class="docutils literal"><span class="pre">Requires</span> <span class="pre">axis</span> <span class="pre">to</span> <span class="pre">be</span> <span class="pre">set</span> <span class="pre">as</span> <span class="pre">int,</span> <span class="pre">because</span> <span class="pre">global</span> <span class="pre">reduction</span> <span class="pre">is</span> <span class="pre">not</span> <span class="pre">supported</span> <span class="pre">yet.</span></code></li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axis is left in the result as dimension with size one.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.argsort">
<code class="descclassname">mxnet.symbol.</code><code class="descname">argsort</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>is_ascend=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.argsort" title="Permalink to this definition"></a></dt>
<dd><p>Returns the indices that would sort an input array along the given axis.</p>
<p>This function performs sorting along the given axis and returns an array of indices having same shape
as an input array that index data in sorted order.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[ 0.3, 0.2, 0.4],
[ 0.1, 0.3, 0.2]]
// sort along axis -1
argsort(x) = [[ 1., 0., 2.],
[ 0., 2., 1.]]
// sort along axis 0
argsort(x, axis=0) = [[ 1., 0., 1.]
[ 0., 1., 0.]]
// flatten and then sort
argsort(x) = [ 3., 1., 5., 0., 4., 2.]
</pre></div>
</div>
<p>Defined in src/operator/tensor/ordering_op.cc:L176</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array</li>
<li><strong>axis</strong> (<em>int or None, optional, default='-1'</em>) – Axis along which to sort the input tensor. If not given, the flattened array is used. Default is -1.</li>
<li><strong>is_ascend</strong> (<em>boolean, optional, default=1</em>) – Whether to sort in ascending or descending order.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.batch_dot">
<code class="descclassname">mxnet.symbol.</code><code class="descname">batch_dot</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>transpose_a=_Null</em>, <em>transpose_b=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.batch_dot" title="Permalink to this definition"></a></dt>
<dd><p>Batchwise dot product.</p>
<p><code class="docutils literal"><span class="pre">batch_dot</span></code> is used to compute dot product of <code class="docutils literal"><span class="pre">x</span></code> and <code class="docutils literal"><span class="pre">y</span></code> when <code class="docutils literal"><span class="pre">x</span></code> and
<code class="docutils literal"><span class="pre">y</span></code> are data in batch, namely 3D arrays in shape of <cite>(batch_size, :, :)</cite>.</p>
<p>For example, given <code class="docutils literal"><span class="pre">x</span></code> with shape <cite>(batch_size, n, m)</cite> and <code class="docutils literal"><span class="pre">y</span></code> with shape
<cite>(batch_size, m, k)</cite>, the result array will have shape <cite>(batch_size, n, k)</cite>,
which is computed by:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">batch_dot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">)[</span><span class="n">i</span><span class="p">,:,:]</span> <span class="o">=</span> <span class="n">dot</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">,:,:],</span> <span class="n">y</span><span class="p">[</span><span class="n">i</span><span class="p">,:,:])</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/dot.cc:L110</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The first input</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The second input</li>
<li><strong>transpose_a</strong> (<em>boolean, optional, default=0</em>) – If true then transpose the first input before dot.</li>
<li><strong>transpose_b</strong> (<em>boolean, optional, default=0</em>) – If true then transpose the second input before dot.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.batch_take">
<code class="descclassname">mxnet.symbol.</code><code class="descname">batch_take</code><span class="sig-paren">(</span><em>a=None</em>, <em>indices=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.batch_take" title="Permalink to this definition"></a></dt>
<dd><p>Takes elements from a data batch.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>batch_take</cite> is deprecated. Use <cite>pick</cite> instead.</p>
</div>
<p>Given an input array of shape <code class="docutils literal"><span class="pre">(d0,</span> <span class="pre">d1)</span></code> and indices of shape <code class="docutils literal"><span class="pre">(i0,)</span></code>, the result will be
an output array of shape <code class="docutils literal"><span class="pre">(i0,)</span></code> with:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">output</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="nb">input</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">indices</span><span class="p">[</span><span class="n">i</span><span class="p">]]</span>
</pre></div>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[ 1., 2.],
[ 3., 4.],
[ 5., 6.]]
// takes elements with specified indices
batch_take(x, [0,1,0]) = [ 1. 4. 5.]
</pre></div>
</div>
<p>Defined in src/operator/tensor/indexing_op.cc:L426</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>a</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array</li>
<li><strong>indices</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The index array</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_add">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_add</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_add" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise sum of the input arrays with broadcasting.</p>
<p><cite>broadcast_plus</cite> is an alias to the function <cite>broadcast_add</cite>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_add</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]]</span>
<span class="n">broadcast_plus</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_basic.cc:L51</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_axes">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_axes</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>size=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_axes" title="Permalink to this definition"></a></dt>
<dd><p>Broadcasts the input array over particular axes.</p>
<p>Broadcasting is allowed on axes with size 1, such as from <cite>(2,1,3,1)</cite> to
<cite>(2,8,3,9)</cite>. Elements will be duplicated on the broadcasted axes.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// given x of shape (1,2,1)
x = [[[ 1.],
[ 2.]]]
// broadcast x on on axis 2
broadcast_axis(x, axis=2, size=3) = [[[ 1., 1., 1.],
[ 2., 2., 2.]]]
// broadcast x on on axes 0 and 2
broadcast_axis(x, axis=(0,2), size=(2,3)) = [[[ 1., 1., 1.],
[ 2., 2., 2.]],
[[ 1., 1., 1.],
[ 2., 2., 2.]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L207</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – The axes to perform the broadcasting.</li>
<li><strong>size</strong> (<em>Shape(tuple), optional, default=[]</em>) – Target sizes of the broadcasting axes.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_axis">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_axis</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>size=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_axis" title="Permalink to this definition"></a></dt>
<dd><p>Broadcasts the input array over particular axes.</p>
<p>Broadcasting is allowed on axes with size 1, such as from <cite>(2,1,3,1)</cite> to
<cite>(2,8,3,9)</cite>. Elements will be duplicated on the broadcasted axes.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// given x of shape (1,2,1)
x = [[[ 1.],
[ 2.]]]
// broadcast x on on axis 2
broadcast_axis(x, axis=2, size=3) = [[[ 1., 1., 1.],
[ 2., 2., 2.]]]
// broadcast x on on axes 0 and 2
broadcast_axis(x, axis=(0,2), size=(2,3)) = [[[ 1., 1., 1.],
[ 2., 2., 2.]],
[[ 1., 1., 1.],
[ 2., 2., 2.]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L207</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – The axes to perform the broadcasting.</li>
<li><strong>size</strong> (<em>Shape(tuple), optional, default=[]</em>) – Target sizes of the broadcasting axes.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_div">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_div</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_div" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise division of the input arrays with broadcasting.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">]]</span>
<span class="n">broadcast_div</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_basic.cc:L157</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_equal">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_equal</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_equal" title="Permalink to this definition"></a></dt>
<dd><p>Returns the result of element-wise <strong>equal to</strong> (==) comparison operation with broadcasting.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_equal</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_logic.cc:L46</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_greater">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_greater</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_greater" title="Permalink to this definition"></a></dt>
<dd><p>Returns the result of element-wise <strong>greater than</strong> (>) comparison operation with broadcasting.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_greater</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_logic.cc:L82</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_greater_equal">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_greater_equal</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_greater_equal" title="Permalink to this definition"></a></dt>
<dd><p>Returns the result of element-wise <strong>greater than or equal to</strong> (>=) comparison operation with broadcasting.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_greater_equal</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_logic.cc:L100</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_hypot">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_hypot</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_hypot" title="Permalink to this definition"></a></dt>
<dd><p>Returns the hypotenuse of a right angled triangle, given its “legs”
with broadcasting.</p>
<p>It is equivalent to doing <span class="math">\(sqrt(x_1^2 + x_2^2)\)</span>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">4.</span><span class="p">]]</span>
<span class="n">broadcast_hypot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">]]</span>
<span class="n">z</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">4.</span><span class="p">]]</span>
<span class="n">broadcast_hypot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">z</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_extended.cc:L156</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_lesser">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_lesser</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_lesser" title="Permalink to this definition"></a></dt>
<dd><p>Returns the result of element-wise <strong>lesser than</strong> (<) comparison operation with broadcasting.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_lesser</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_logic.cc:L118</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_lesser_equal">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_lesser_equal</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_lesser_equal" title="Permalink to this definition"></a></dt>
<dd><p>Returns the result of element-wise <strong>lesser than or equal to</strong> (<=) comparison operation with broadcasting.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_lesser_equal</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_logic.cc:L136</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_maximum">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_maximum</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_maximum" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise maximum of the input arrays with broadcasting.</p>
<p>This function compares two input arrays and returns a new array having the element-wise maxima.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_maximum</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_extended.cc:L80</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_minimum">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_minimum</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_minimum" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise minimum of the input arrays with broadcasting.</p>
<p>This function compares two input arrays and returns a new array having the element-wise minima.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_maximum</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_extended.cc:L115</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_minus">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_minus</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_minus" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise difference of the input arrays with broadcasting.</p>
<p><cite>broadcast_minus</cite> is an alias to the function <cite>broadcast_sub</cite>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_sub</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]]</span>
<span class="n">broadcast_minus</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_basic.cc:L90</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_mod">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_mod</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_mod" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise modulo of the input arrays with broadcasting.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">]]</span>
<span class="n">broadcast_mod</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_basic.cc:L190</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_mul">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_mul</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_mul" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise product of the input arrays with broadcasting.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_mul</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_basic.cc:L123</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_not_equal">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_not_equal</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_not_equal" title="Permalink to this definition"></a></dt>
<dd><p>Returns the result of element-wise <strong>not equal to</strong> (!=) comparison operation with broadcasting.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_not_equal</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_logic.cc:L64</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_plus">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_plus</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_plus" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise sum of the input arrays with broadcasting.</p>
<p><cite>broadcast_plus</cite> is an alias to the function <cite>broadcast_add</cite>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_add</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]]</span>
<span class="n">broadcast_plus</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_basic.cc:L51</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_power">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_power</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_power" title="Permalink to this definition"></a></dt>
<dd><p>Returns result of first array elements raised to powers from second array, element-wise with broadcasting.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_power</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_extended.cc:L45</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_sub">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_sub</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_sub" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise difference of the input arrays with broadcasting.</p>
<p><cite>broadcast_minus</cite> is an alias to the function <cite>broadcast_sub</cite>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">broadcast_sub</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]]</span>
<span class="n">broadcast_minus</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_broadcast_op_basic.cc:L90</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input to the function</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input to the function</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.broadcast_to">
<code class="descclassname">mxnet.symbol.</code><code class="descname">broadcast_to</code><span class="sig-paren">(</span><em>data=None</em>, <em>shape=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.broadcast_to" title="Permalink to this definition"></a></dt>
<dd><p>Broadcasts the input array to a new shape.</p>
<p>Broadcasting is a mechanism that allows NDArrays to perform arithmetic operations
with arrays of different shapes efficiently without creating multiple copies of arrays.
Also see, <a class="reference external" href="https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html">Broadcasting</a> for more explanation.</p>
<p>Broadcasting is allowed on axes with size 1, such as from <cite>(2,1,3,1)</cite> to
<cite>(2,8,3,9)</cite>. Elements will be duplicated on the broadcasted axes.</p>
<p>For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>broadcast_to([[1,2,3]], shape=(2,3)) = [[ 1., 2., 3.],
[ 1., 2., 3.]])
</pre></div>
</div>
<p>The dimension which you do not want to change can also be kept as <cite>0</cite> which means copy the original value.
So with <cite>shape=(2,0)</cite>, we will obtain the same result as in the above example.</p>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L231</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – The shape of the desired array. We can set the dim to zero if it’s same as the original. E.g <cite>A = broadcast_to(B, shape=(10, 0, 0))</cite> has the same meaning as <cite>A = broadcast_axis(B, axis=0, size=10)</cite>.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.cast">
<code class="descclassname">mxnet.symbol.</code><code class="descname">cast</code><span class="sig-paren">(</span><em>data=None</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.cast" title="Permalink to this definition"></a></dt>
<dd><p>Casts all elements of the input to a new type.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">Cast</span></code> is deprecated. Use <code class="docutils literal"><span class="pre">cast</span></code> instead.</p>
</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">cast</span><span class="p">([</span><span class="mf">0.9</span><span class="p">,</span> <span class="mf">1.3</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s1">'int32'</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span>
<span class="n">cast</span><span class="p">([</span><span class="mf">1e20</span><span class="p">,</span> <span class="mf">11.1</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s1">'float16'</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="n">inf</span><span class="p">,</span> <span class="mf">11.09375</span><span class="p">]</span>
<span class="n">cast</span><span class="p">([</span><span class="mi">300</span><span class="p">,</span> <span class="mf">11.1</span><span class="p">,</span> <span class="mf">10.9</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">3</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s1">'uint8'</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="mi">44</span><span class="p">,</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">255</span><span class="p">,</span> <span class="mi">253</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L385</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input.</li>
<li><strong>dtype</strong> (<em>{'float16', 'float32', 'float64', 'int32', 'int64', 'int8', 'uint8'}, required</em>) – Output data type.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.cast_storage">
<code class="descclassname">mxnet.symbol.</code><code class="descname">cast_storage</code><span class="sig-paren">(</span><em>data=None</em>, <em>stype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.cast_storage" title="Permalink to this definition"></a></dt>
<dd><p>Casts tensor storage type to the new type.</p>
<p>When an NDArray with default storage type is cast to csr or row_sparse storage,
the result is compact, which means:</p>
<ul class="simple">
<li>for csr, zero values will not be retained</li>
<li>for row_sparse, row slices of all zeros will not be retained</li>
</ul>
<p>The storage type of <code class="docutils literal"><span class="pre">cast_storage</span></code> output depends on stype parameter:</p>
<ul class="simple">
<li>cast_storage(csr, ‘default’) = default</li>
<li>cast_storage(row_sparse, ‘default’) = default</li>
<li>cast_storage(default, ‘csr’) = csr</li>
<li>cast_storage(default, ‘row_sparse’) = row_sparse</li>
</ul>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">dense</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]]</span>
<span class="c1"># cast to row_sparse storage type</span>
<span class="n">rsp</span> <span class="o">=</span> <span class="n">cast_storage</span><span class="p">(</span><span class="n">dense</span><span class="p">,</span> <span class="s1">'row_sparse'</span><span class="p">)</span>
<span class="n">rsp</span><span class="o">.</span><span class="n">indices</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span>
<span class="n">rsp</span><span class="o">.</span><span class="n">values</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">]]</span>
<span class="c1"># cast to csr storage type</span>
<span class="n">csr</span> <span class="o">=</span> <span class="n">cast_storage</span><span class="p">(</span><span class="n">dense</span><span class="p">,</span> <span class="s1">'csr'</span><span class="p">)</span>
<span class="n">csr</span><span class="o">.</span><span class="n">indices</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span>
<span class="n">csr</span><span class="o">.</span><span class="n">values</span> <span class="o">=</span> <span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">]</span>
<span class="n">csr</span><span class="o">.</span><span class="n">indptr</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/cast_storage.cc:L69</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input.</li>
<li><strong>stype</strong> (<em>{'csr', 'default', 'row_sparse'}, required</em>) – Output storage type.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.cbrt">
<code class="descclassname">mxnet.symbol.</code><code class="descname">cbrt</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.cbrt" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise cube-root value of the input.</p>
<div class="math">
\[cbrt(x) = \sqrt[3]{x}\]</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">cbrt</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="o">-</span><span class="mi">125</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="o">-</span><span class="mi">5</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L676</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.ceil">
<code class="descclassname">mxnet.symbol.</code><code class="descname">ceil</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.ceil" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise ceiling of the input.</p>
<p>The ceil of the scalar x is the smallest integer i, such that i >= x.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">ceil</span><span class="p">([</span><span class="o">-</span><span class="mf">2.1</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.9</span><span class="p">,</span> <span class="mf">1.5</span><span class="p">,</span> <span class="mf">1.9</span><span class="p">,</span> <span class="mf">2.1</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="o">-</span><span class="mf">2.</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">ceil</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>ceil(default) = default</li>
<li>ceil(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L538</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.choose_element_0index">
<code class="descclassname">mxnet.symbol.</code><code class="descname">choose_element_0index</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.choose_element_0index" title="Permalink to this definition"></a></dt>
<dd><p>Choose one element from each line(row for python, column for R/Julia) in lhs according to index indicated by rhs. This function assume rhs uses 0-based index.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="../ndarray/ndarray.html#mxnet.ndarray.NDArray" title="mxnet.ndarray.NDArray"><em>NDArray</em></a>) – Left operand to the function.</li>
<li><strong>rhs</strong> (<a class="reference internal" href="../ndarray/ndarray.html#mxnet.ndarray.NDArray" title="mxnet.ndarray.NDArray"><em>NDArray</em></a>) – Right operand to the function.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.clip">
<code class="descclassname">mxnet.symbol.</code><code class="descname">clip</code><span class="sig-paren">(</span><em>data=None</em>, <em>a_min=_Null</em>, <em>a_max=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.clip" title="Permalink to this definition"></a></dt>
<dd><p>Clips (limits) the values in an array.</p>
<p>Given an interval, values outside the interval are clipped to the interval edges.
Clipping <code class="docutils literal"><span class="pre">x</span></code> between <cite>a_min</cite> and <cite>a_x</cite> would be:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>clip(x, a_min, a_max) = max(min(x, a_max), a_min))
</pre></div>
</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">]</span>
<span class="n">clip</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">8</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">clip</span></code> output depends on storage types of inputs and the a_min, a_max parameter values:</p>
<blockquote>
<div><ul class="simple">
<li>clip(default) = default</li>
<li>clip(row_sparse, a_min <= 0, a_max >= 0) = row_sparse</li>
<li>clip(csr, a_min <= 0, a_max >= 0) = csr</li>
<li>clip(row_sparse, a_min < 0, a_max < 0) = default</li>
<li>clip(row_sparse, a_min > 0, a_max > 0) = default</li>
<li>clip(csr, a_min < 0, a_max < 0) = csr</li>
<li>clip(csr, a_min > 0, a_max > 0) = csr</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/matrix_op.cc:L542</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input array.</li>
<li><strong>a_min</strong> (<em>float, required</em>) – Minimum value</li>
<li><strong>a_max</strong> (<em>float, required</em>) – Maximum value</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.concat">
<code class="descclassname">mxnet.symbol.</code><code class="descname">concat</code><span class="sig-paren">(</span><em>*data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.concat" title="Permalink to this definition"></a></dt>
<dd><p>Joins input arrays along a given axis.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>Concat</cite> is deprecated. Use <cite>concat</cite> instead.</p>
</div>
<p>The dimensions of the input arrays should be the same except the axis along
which they will be concatenated.
The dimension of the output array along the concatenated axis will be equal
to the sum of the corresponding dimensions of the input arrays.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[1,1],[2,2]]
y = [[3,3],[4,4],[5,5]]
z = [[6,6], [7,7],[8,8]]
concat(x,y,z,dim=0) = [[ 1., 1.],
[ 2., 2.],
[ 3., 3.],
[ 4., 4.],
[ 5., 5.],
[ 6., 6.],
[ 7., 7.],
[ 8., 8.]]
Note that you cannot concat x,y,z along dimension 1 since dimension
0 is not the same for all the input arrays.
concat(y,z,dim=1) = [[ 3., 3., 6., 6.],
[ 4., 4., 7., 7.],
[ 5., 5., 8., 8.]]
</pre></div>
</div>
<p>Defined in src/operator/nn/concat.cc:L235
This function support variable length of positional input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<em>Symbol[]</em>) – List of arrays to concatenate</li>
<li><strong>dim</strong> (<em>int, optional, default='1'</em>) – the dimension to be concated.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.cos">
<code class="descclassname">mxnet.symbol.</code><code class="descname">cos</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.cos" title="Permalink to this definition"></a></dt>
<dd><p>Computes the element-wise cosine of the input array.</p>
<p>The input should be in radians (<span class="math">\(2\pi\)</span> rad equals 360 degrees).</p>
<div class="math">
\[cos([0, \pi/4, \pi/2]) = [1, 0.707, 0]\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">cos</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L63</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.cosh">
<code class="descclassname">mxnet.symbol.</code><code class="descname">cosh</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.cosh" title="Permalink to this definition"></a></dt>
<dd><p>Returns the hyperbolic cosine of the input array, computed element-wise.</p>
<div class="math">
\[cosh(x) = 0.5\times(exp(x) + exp(-x))\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">cosh</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L216</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.crop">
<code class="descclassname">mxnet.symbol.</code><code class="descname">crop</code><span class="sig-paren">(</span><em>data=None</em>, <em>begin=_Null</em>, <em>end=_Null</em>, <em>step=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.crop" title="Permalink to this definition"></a></dt>
<dd><p>Slices a region of the array.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">crop</span></code> is deprecated. Use <code class="docutils literal"><span class="pre">slice</span></code> instead.</p>
</div>
<p>This function returns a sliced array between the indices given
by <cite>begin</cite> and <cite>end</cite> with the corresponding <cite>step</cite>.</p>
<p>For an input array of <code class="docutils literal"><span class="pre">shape=(d_0,</span> <span class="pre">d_1,</span> <span class="pre">...,</span> <span class="pre">d_n-1)</span></code>,
slice operation with <code class="docutils literal"><span class="pre">begin=(b_0,</span> <span class="pre">b_1...b_m-1)</span></code>,
<code class="docutils literal"><span class="pre">end=(e_0,</span> <span class="pre">e_1,</span> <span class="pre">...,</span> <span class="pre">e_m-1)</span></code>, and <code class="docutils literal"><span class="pre">step=(s_0,</span> <span class="pre">s_1,</span> <span class="pre">...,</span> <span class="pre">s_m-1)</span></code>,
where m <= n, results in an array with the shape
<code class="docutils literal"><span class="pre">(|e_0-b_0|/|s_0|,</span> <span class="pre">...,</span> <span class="pre">|e_m-1-b_m-1|/|s_m-1|,</span> <span class="pre">d_m,</span> <span class="pre">...,</span> <span class="pre">d_n-1)</span></code>.</p>
<p>The resulting array’s <em>k</em>-th dimension contains elements
from the <em>k</em>-th dimension of the input array starting
from index <code class="docutils literal"><span class="pre">b_k</span></code> (inclusive) with step <code class="docutils literal"><span class="pre">s_k</span></code>
until reaching <code class="docutils literal"><span class="pre">e_k</span></code> (exclusive).</p>
<p>If the <em>k</em>-th elements are <cite>None</cite> in the sequence of <cite>begin</cite>, <cite>end</cite>,
and <cite>step</cite>, the following rule will be used to set default values.
If <cite>s_k</cite> is <cite>None</cite>, set <cite>s_k=1</cite>. If <cite>s_k > 0</cite>, set <cite>b_k=0</cite>, <cite>e_k=d_k</cite>;
else, set <cite>b_k=d_k-1</cite>, <cite>e_k=-1</cite>.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">slice</span></code> output depends on storage types of inputs</p>
<ul class="simple">
<li>slice(csr) = csr</li>
<li>otherwise, <code class="docutils literal"><span class="pre">slice</span></code> generates output with default storage</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">When input data storage type is csr, it only supports</p>
</div>
<p>step=(), or step=(None,), or step=(1,) to generate a csr output.
For other step parameter values, it falls back to slicing
a dense tensor.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">9.</span><span class="p">,</span> <span class="mf">10.</span><span class="p">,</span> <span class="mf">11.</span><span class="p">,</span> <span class="mf">12.</span><span class="p">]]</span>
<span class="nb">slice</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">begin</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">),</span> <span class="n">end</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">4</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">]]</span>
<span class="nb">slice</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">begin</span><span class="o">=</span><span class="p">(</span><span class="bp">None</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">end</span><span class="o">=</span><span class="p">(</span><span class="bp">None</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">step</span><span class="o">=</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span><span class="mf">9.</span><span class="p">,</span> <span class="mf">11.</span><span class="p">],</span>
<span class="p">[</span><span class="mf">5.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">],</span>
<span class="p">[</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/matrix_op.cc:L411</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Source input</li>
<li><strong>begin</strong> (<em>Shape(tuple), required</em>) – starting indices for the slice operation, supports negative indices.</li>
<li><strong>end</strong> (<em>Shape(tuple), required</em>) – ending indices for the slice operation, supports negative indices.</li>
<li><strong>step</strong> (<em>Shape(tuple), optional, default=[]</em>) – step for the slice operation, supports negative values.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.degrees">
<code class="descclassname">mxnet.symbol.</code><code class="descname">degrees</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.degrees" title="Permalink to this definition"></a></dt>
<dd><p>Converts each element of the input array from radians to degrees.</p>
<div class="math">
\[degrees([0, \pi/2, \pi, 3\pi/2, 2\pi]) = [0, 90, 180, 270, 360]\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">degrees</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>degrees(default) = default</li>
<li>degrees(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L163</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.dot">
<code class="descclassname">mxnet.symbol.</code><code class="descname">dot</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>transpose_a=_Null</em>, <em>transpose_b=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.dot" title="Permalink to this definition"></a></dt>
<dd><p>Dot product of two arrays.</p>
<p><code class="docutils literal"><span class="pre">dot</span></code>‘s behavior depends on the input array dimensions:</p>
<ul>
<li><p class="first">1-D arrays: inner product of vectors</p>
</li>
<li><p class="first">2-D arrays: matrix multiplication</p>
</li>
<li><p class="first">N-D arrays: a sum product over the last axis of the first input and the first
axis of the second input</p>
<p>For example, given 3-D <code class="docutils literal"><span class="pre">x</span></code> with shape <cite>(n,m,k)</cite> and <code class="docutils literal"><span class="pre">y</span></code> with shape <cite>(k,r,s)</cite>, the
result array will have shape <cite>(n,m,r,s)</cite>. It is computed by:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">dot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">)[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">,</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="p">]</span> <span class="o">=</span> <span class="nb">sum</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">,:]</span><span class="o">*</span><span class="n">y</span><span class="p">[:,</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="p">])</span>
</pre></div>
</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="n">reshape</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">7</span><span class="p">],</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span>
<span class="n">y</span> <span class="o">=</span> <span class="n">reshape</span><span class="p">([</span><span class="mi">7</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">],</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span>
<span class="n">dot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">)[</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span>
<span class="nb">sum</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,:]</span><span class="o">*</span><span class="n">y</span><span class="p">[:,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">])</span> <span class="o">=</span> <span class="mi">0</span>
</pre></div>
</div>
</li>
</ul>
<p>The storage type of <code class="docutils literal"><span class="pre">dot</span></code> output depends on storage types of inputs and transpose options:</p>
<ul class="simple">
<li>dot(csr, default) = default</li>
<li>dot(csr.T, default) = row_sparse</li>
<li>dot(csr, row_sparse) = default</li>
<li>dot(default, csr) = csr</li>
<li>otherwise, <code class="docutils literal"><span class="pre">dot</span></code> generates output with default storage</li>
</ul>
<p>Defined in src/operator/tensor/dot.cc:L62</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The first input</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The second input</li>
<li><strong>transpose_a</strong> (<em>boolean, optional, default=0</em>) – If true then transpose the first input before dot.</li>
<li><strong>transpose_b</strong> (<em>boolean, optional, default=0</em>) – If true then transpose the second input before dot.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.elemwise_add">
<code class="descclassname">mxnet.symbol.</code><code class="descname">elemwise_add</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.elemwise_add" title="Permalink to this definition"></a></dt>
<dd><p>Adds arguments element-wise.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">elemwise_add</span></code> output depends on storage types of inputs</p>
<blockquote>
<div><ul class="simple">
<li>elemwise_add(row_sparse, row_sparse) = row_sparse</li>
<li>elemwise_add(csr, csr) = csr</li>
<li>otherwise, <code class="docutils literal"><span class="pre">elemwise_add</span></code> generates output with default storage</li>
</ul>
</div></blockquote>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – first input</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – second input</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.elemwise_div">
<code class="descclassname">mxnet.symbol.</code><code class="descname">elemwise_div</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.elemwise_div" title="Permalink to this definition"></a></dt>
<dd><p>Divides arguments element-wise.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">elemwise_div</span></code> output is always dense</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – first input</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – second input</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.elemwise_mul">
<code class="descclassname">mxnet.symbol.</code><code class="descname">elemwise_mul</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.elemwise_mul" title="Permalink to this definition"></a></dt>
<dd><p>Multiplies arguments element-wise.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">elemwise_mul</span></code> output depends on storage types of inputs</p>
<blockquote>
<div><ul class="simple">
<li>elemwise_mul(default, default) = default</li>
<li>elemwise_mul(row_sparse, row_sparse) = row_sparse</li>
<li>elemwise_mul(default, row_sparse) = default</li>
<li>elemwise_mul(row_sparse, default) = default</li>
<li>elemwise_mul(csr, csr) = csr</li>
<li>otherwise, <code class="docutils literal"><span class="pre">elemwise_mul</span></code> generates output with default storage</li>
</ul>
</div></blockquote>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – first input</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – second input</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.elemwise_sub">
<code class="descclassname">mxnet.symbol.</code><code class="descname">elemwise_sub</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.elemwise_sub" title="Permalink to this definition"></a></dt>
<dd><p>Subtracts arguments element-wise.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">elemwise_sub</span></code> output depends on storage types of inputs</p>
<blockquote>
<div><ul class="simple">
<li>elemwise_sub(row_sparse, row_sparse) = row_sparse</li>
<li>elemwise_sub(csr, csr) = csr</li>
<li>otherwise, <code class="docutils literal"><span class="pre">elemwise_sub</span></code> generates output with default storage</li>
</ul>
</div></blockquote>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – first input</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – second input</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.exp">
<code class="descclassname">mxnet.symbol.</code><code class="descname">exp</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.exp" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise exponential value of the input.</p>
<div class="math">
\[exp(x) = e^x \approx 2.718^x\]</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">exp</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">2.71828175</span><span class="p">,</span> <span class="mf">7.38905621</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">exp</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L716</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.expand_dims">
<code class="descclassname">mxnet.symbol.</code><code class="descname">expand_dims</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.expand_dims" title="Permalink to this definition"></a></dt>
<dd><p>Inserts a new axis of size 1 into the array shape</p>
<p>For example, given <code class="docutils literal"><span class="pre">x</span></code> with shape <code class="docutils literal"><span class="pre">(2,3,4)</span></code>, then <code class="docutils literal"><span class="pre">expand_dims(x,</span> <span class="pre">axis=1)</span></code>
will return a new array with shape <code class="docutils literal"><span class="pre">(2,1,3,4)</span></code>.</p>
<p>Defined in src/operator/tensor/matrix_op.cc:L345</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Source input</li>
<li><strong>axis</strong> (<em>int, required</em>) – Position where new axis is to be inserted. Suppose that the input <cite>NDArray</cite>‘s dimension is <cite>ndim</cite>, the range of the inserted axis is <cite>[-ndim, ndim]</cite></li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.expm1">
<code class="descclassname">mxnet.symbol.</code><code class="descname">expm1</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.expm1" title="Permalink to this definition"></a></dt>
<dd><p>Returns <code class="docutils literal"><span class="pre">exp(x)</span> <span class="pre">-</span> <span class="pre">1</span></code> computed element-wise on the input.</p>
<p>This function provides greater precision than <code class="docutils literal"><span class="pre">exp(x)</span> <span class="pre">-</span> <span class="pre">1</span></code> for small values of <code class="docutils literal"><span class="pre">x</span></code>.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">expm1</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>expm1(default) = default</li>
<li>expm1(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L795</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.fill_element_0index">
<code class="descclassname">mxnet.symbol.</code><code class="descname">fill_element_0index</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>mhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.fill_element_0index" title="Permalink to this definition"></a></dt>
<dd><p>Fill one element of each line(row for python, column for R/Julia) in lhs according to index indicated by rhs and values indicated by mhs. This function assume rhs uses 0-based index.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="../ndarray/ndarray.html#mxnet.ndarray.NDArray" title="mxnet.ndarray.NDArray"><em>NDArray</em></a>) – Left operand to the function.</li>
<li><strong>mhs</strong> (<a class="reference internal" href="../ndarray/ndarray.html#mxnet.ndarray.NDArray" title="mxnet.ndarray.NDArray"><em>NDArray</em></a>) – Middle operand to the function.</li>
<li><strong>rhs</strong> (<a class="reference internal" href="../ndarray/ndarray.html#mxnet.ndarray.NDArray" title="mxnet.ndarray.NDArray"><em>NDArray</em></a>) – Right operand to the function.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.fix">
<code class="descclassname">mxnet.symbol.</code><code class="descname">fix</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.fix" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise rounded value to the nearest integer towards zero of the input.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">fix</span><span class="p">([</span><span class="o">-</span><span class="mf">2.1</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.9</span><span class="p">,</span> <span class="mf">1.9</span><span class="p">,</span> <span class="mf">2.1</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="o">-</span><span class="mf">2.</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">fix</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>fix(default) = default</li>
<li>fix(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L595</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.flatten">
<code class="descclassname">mxnet.symbol.</code><code class="descname">flatten</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.flatten" title="Permalink to this definition"></a></dt>
<dd><p>Flattens the input array into a 2-D array by collapsing the higher dimensions.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>Flatten</cite> is deprecated. Use <cite>flatten</cite> instead.</p>
</div>
<p>For an input array with shape <code class="docutils literal"><span class="pre">(d1,</span> <span class="pre">d2,</span> <span class="pre">...,</span> <span class="pre">dk)</span></code>, <cite>flatten</cite> operation reshapes
the input array into an output array of shape <code class="docutils literal"><span class="pre">(d1,</span> <span class="pre">d2*...*dk)</span></code>.</p>
<p>Note that the bahavior of this function is different from numpy.ndarray.flatten,
which behaves similar to mxnet.ndarray.reshape((-1,)).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span>
<span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span>
<span class="p">[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">],</span>
<span class="p">[</span><span class="mi">7</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">9</span><span class="p">]</span>
<span class="p">],</span>
<span class="p">[</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span>
<span class="p">[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">],</span>
<span class="p">[</span><span class="mi">7</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">9</span><span class="p">]</span>
<span class="p">]],</span>
<span class="n">flatten</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">9.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">9.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/matrix_op.cc:L257</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.flip">
<code class="descclassname">mxnet.symbol.</code><code class="descname">flip</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.flip" title="Permalink to this definition"></a></dt>
<dd><p>Reverses the order of elements along given axis while preserving array shape.</p>
<p>Note: reverse and flip are equivalent. We use reverse in the following examples.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">9.</span><span class="p">]]</span>
<span class="n">reverse</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">9.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]</span>
<span class="n">reverse</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">9.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/matrix_op.cc:L717</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data array</li>
<li><strong>axis</strong> (<em>Shape(tuple), required</em>) – The axis which to reverse elements.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.floor">
<code class="descclassname">mxnet.symbol.</code><code class="descname">floor</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.floor" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise floor of the input.</p>
<p>The floor of the scalar x is the largest integer i, such that i <= x.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">floor</span><span class="p">([</span><span class="o">-</span><span class="mf">2.1</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.9</span><span class="p">,</span> <span class="mf">1.5</span><span class="p">,</span> <span class="mf">1.9</span><span class="p">,</span> <span class="mf">2.1</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="o">-</span><span class="mf">3.</span><span class="p">,</span> <span class="o">-</span><span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">floor</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>floor(default) = default</li>
<li>floor(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L557</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.ftml_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">ftml_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>d=None</em>, <em>v=None</em>, <em>z=None</em>, <em>lr=_Null</em>, <em>beta1=_Null</em>, <em>beta2=_Null</em>, <em>epsilon=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.ftml_update" title="Permalink to this definition"></a></dt>
<dd><p>The FTML optimizer described in
<em>FTML - Follow the Moving Leader in Deep Learning</em>,
available at <a class="reference external" href="http://proceedings.mlr.press/v70/zheng17a/zheng17a.pdf">http://proceedings.mlr.press/v70/zheng17a/zheng17a.pdf</a>.</p>
<div class="math">
\[\begin{split}g_t = \nabla J(W_{t-1})\\
v_t = \beta_2 v_{t-1} + (1 - \beta_2) g_t^2\\
d_t = \frac{ (1 - \beta_1^t) }{ \eta_t } (\sqrt{ \frac{ v_t }{ 1 - \beta_2^t } } + \epsilon)
\sigma_t = d_t - \beta_1 d_{t-1}
z_t = \beta_1 z_{ t-1 } + (1 - \beta_1^t) g_t - \sigma_t W_{t-1}
W_t = - \frac{ z_t }{ d_t }\end{split}\]</div>
<p>Defined in src/operator/optimizer_op.cc:L336</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Gradient</li>
<li><strong>d</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Internal state <code class="docutils literal"><span class="pre">d_t</span></code></li>
<li><strong>v</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Internal state <code class="docutils literal"><span class="pre">v_t</span></code></li>
<li><strong>z</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Internal state <code class="docutils literal"><span class="pre">z_t</span></code></li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>beta1</strong> (<em>float, optional, default=0.9</em>) – The decay rate for the 1st moment estimates.</li>
<li><strong>beta2</strong> (<em>float, optional, default=0.999</em>) – The decay rate for the 2nd moment estimates.</li>
<li><strong>epsilon</strong> (<em>float, optional, default=1e-08</em>) – A small constant for numerical stability.</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.ftrl_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">ftrl_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>z=None</em>, <em>n=None</em>, <em>lr=_Null</em>, <em>lamda1=_Null</em>, <em>beta=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.ftrl_update" title="Permalink to this definition"></a></dt>
<dd><p>Update function for Ftrl optimizer.
Referenced from <em>Ad Click Prediction: a View from the Trenches</em>, available at
<a class="reference external" href="http://dl.acm.org/citation.cfm?id=2488200">http://dl.acm.org/citation.cfm?id=2488200</a>.</p>
<p>It updates the weights using:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">rescaled_grad</span> <span class="o">=</span> <span class="n">clip</span><span class="p">(</span><span class="n">grad</span> <span class="o">*</span> <span class="n">rescale_grad</span><span class="p">,</span> <span class="n">clip_gradient</span><span class="p">)</span>
<span class="n">z</span> <span class="o">+=</span> <span class="n">rescaled_grad</span> <span class="o">-</span> <span class="p">(</span><span class="n">sqrt</span><span class="p">(</span><span class="n">n</span> <span class="o">+</span> <span class="n">rescaled_grad</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span> <span class="o">-</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">n</span><span class="p">))</span> <span class="o">*</span> <span class="n">weight</span> <span class="o">/</span> <span class="n">learning_rate</span>
<span class="n">n</span> <span class="o">+=</span> <span class="n">rescaled_grad</span><span class="o">**</span><span class="mi">2</span>
<span class="n">w</span> <span class="o">=</span> <span class="p">(</span><span class="n">sign</span><span class="p">(</span><span class="n">z</span><span class="p">)</span> <span class="o">*</span> <span class="n">lamda1</span> <span class="o">-</span> <span class="n">z</span><span class="p">)</span> <span class="o">/</span> <span class="p">((</span><span class="n">beta</span> <span class="o">+</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">n</span><span class="p">))</span> <span class="o">/</span> <span class="n">learning_rate</span> <span class="o">+</span> <span class="n">wd</span><span class="p">)</span> <span class="o">*</span> <span class="p">(</span><span class="nb">abs</span><span class="p">(</span><span class="n">z</span><span class="p">)</span> <span class="o">></span> <span class="n">lamda1</span><span class="p">)</span>
</pre></div>
</div>
<p>If w, z and n are all of <code class="docutils literal"><span class="pre">row_sparse</span></code> storage type,
only the row slices whose indices appear in grad.indices are updated (for w, z and n):</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">grad</span><span class="o">.</span><span class="n">indices</span><span class="p">:</span>
<span class="n">rescaled_grad</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">=</span> <span class="n">clip</span><span class="p">(</span><span class="n">grad</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">*</span> <span class="n">rescale_grad</span><span class="p">,</span> <span class="n">clip_gradient</span><span class="p">)</span>
<span class="n">z</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">+=</span> <span class="n">rescaled_grad</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">-</span> <span class="p">(</span><span class="n">sqrt</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">+</span> <span class="n">rescaled_grad</span><span class="p">[</span><span class="n">row</span><span class="p">]</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span> <span class="o">-</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="n">row</span><span class="p">]))</span> <span class="o">*</span> <span class="n">weight</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">/</span> <span class="n">learning_rate</span>
<span class="n">n</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">+=</span> <span class="n">rescaled_grad</span><span class="p">[</span><span class="n">row</span><span class="p">]</span><span class="o">**</span><span class="mi">2</span>
<span class="n">w</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span><span class="n">sign</span><span class="p">(</span><span class="n">z</span><span class="p">[</span><span class="n">row</span><span class="p">])</span> <span class="o">*</span> <span class="n">lamda1</span> <span class="o">-</span> <span class="n">z</span><span class="p">[</span><span class="n">row</span><span class="p">])</span> <span class="o">/</span> <span class="p">((</span><span class="n">beta</span> <span class="o">+</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="n">row</span><span class="p">]))</span> <span class="o">/</span> <span class="n">learning_rate</span> <span class="o">+</span> <span class="n">wd</span><span class="p">)</span> <span class="o">*</span> <span class="p">(</span><span class="nb">abs</span><span class="p">(</span><span class="n">z</span><span class="p">[</span><span class="n">row</span><span class="p">])</span> <span class="o">></span> <span class="n">lamda1</span><span class="p">)</span>
</pre></div>
</div>
<p>Defined in src/operator/optimizer_op.cc:L520</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Gradient</li>
<li><strong>z</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – z</li>
<li><strong>n</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Square of grad</li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>lamda1</strong> (<em>float, optional, default=0.01</em>) – The L1 regularization coefficient.</li>
<li><strong>beta</strong> (<em>float, optional, default=1</em>) – Per-Coordinate Learning Rate beta.</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.gamma">
<code class="descclassname">mxnet.symbol.</code><code class="descname">gamma</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.gamma" title="Permalink to this definition"></a></dt>
<dd><p>Returns the gamma function (extension of the factorial function to the reals), computed element-wise on the input array.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">gamma</span></code> output is always dense</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.gammaln">
<code class="descclassname">mxnet.symbol.</code><code class="descname">gammaln</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.gammaln" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise log of the absolute value of the gamma function of the input.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">gammaln</span></code> output is always dense</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.gather_nd">
<code class="descclassname">mxnet.symbol.</code><code class="descname">gather_nd</code><span class="sig-paren">(</span><em>data=None</em>, <em>indices=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.gather_nd" title="Permalink to this definition"></a></dt>
<dd><p>Gather elements or slices from <cite>data</cite> and store to a tensor whose
shape is defined by <cite>indices</cite>.</p>
<p>Given <cite>data</cite> with shape <cite>(X_0, X_1, ..., X_{N-1})</cite> and indices with shape
<cite>(M, Y_0, ..., Y_{K-1})</cite>, the output will have shape <cite>(Y_0, ..., Y_{K-1}, X_M, ..., X_{N-1})</cite>,
where <cite>M <= N</cite>. If <cite>M == N</cite>, output shape will simply be <cite>(Y_0, ..., Y_{K-1})</cite>.</p>
<p>The elements in output is defined as follows:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>output[y_0, ..., y_{K-1}, x_M, ..., x_{N-1}] = data[indices[0, y_0, ..., y_{K-1}],
...,
indices[M-1, y_0, ..., y_{K-1}],
x_M, ..., x_{N-1}]
</pre></div>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">data</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">]]</span>
<span class="n">indices</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">]]</span>
<span class="n">gather_nd</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">indices</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">]</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – data</li>
<li><strong>indices</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – indices</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.identity">
<code class="descclassname">mxnet.symbol.</code><code class="descname">identity</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.identity" title="Permalink to this definition"></a></dt>
<dd><p>Returns a copy of the input.</p>
<p>From:src/operator/tensor/elemwise_unary_op_basic.cc:176</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.khatri_rao">
<code class="descclassname">mxnet.symbol.</code><code class="descname">khatri_rao</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.khatri_rao" title="Permalink to this definition"></a></dt>
<dd><p>Computes the Khatri-Rao product of the input matrices.</p>
<p>Given a collection of <span class="math">\(n\)</span> input matrices,</p>
<div class="math">
\[A_1 \in \mathbb{R}^{M_1 \times M}, \ldots, A_n \in \mathbb{R}^{M_n \times N},\]</div>
<p>the (column-wise) Khatri-Rao product is defined as the matrix,</p>
<div class="math">
\[X = A_1 \otimes \cdots \otimes A_n \in \mathbb{R}^{(M_1 \cdots M_n) \times N},\]</div>
<p>where the <span class="math">\(k`th column is equal to the column-wise outer product
:math:`{A_1}_k \otimes \cdots \otimes {A_n}_k\)</span> where <span class="math">\({A_i}_k\)</span> is the kth
column of the ith matrix.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">A</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">],</span>
<span class="gp">>>> </span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="o">-</span><span class="mi">3</span><span class="p">]])</span>
<span class="gp">>>> </span><span class="n">B</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">],</span>
<span class="gp">>>> </span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">5</span><span class="p">],</span>
<span class="gp">>>> </span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">6</span><span class="p">]])</span>
<span class="gp">>>> </span><span class="n">C</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">khatri_rao</span><span class="p">(</span><span class="n">A</span><span class="p">,</span> <span class="n">B</span><span class="p">)</span>
<span class="gp">>>> </span><span class="k">print</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">())</span>
<span class="go">[[ 1. -4.]</span>
<span class="go"> [ 2. -5.]</span>
<span class="go"> [ 3. -6.]</span>
<span class="go"> [ 2. -12.]</span>
<span class="go"> [ 4. -15.]</span>
<span class="go"> [ 6. -18.]]</span>
</pre></div>
</div>
<p>Defined in src/operator/contrib/krprod.cc:L108
This function support variable length of positional input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>args</strong> (<em>Symbol[]</em>) – Positional input matrices</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.linalg_gelqf">
<code class="descclassname">mxnet.symbol.</code><code class="descname">linalg_gelqf</code><span class="sig-paren">(</span><em>A=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.linalg_gelqf" title="Permalink to this definition"></a></dt>
<dd><p>LQ factorization for general matrix.
Input is a tensor <em>A</em> of dimension <em>n >= 2</em>.</p>
<p>If <em>n=2</em>, we compute the LQ factorization (LAPACK <em>gelqf</em>, followed by <em>orglq</em>). <em>A</em>
must have shape <em>(x, y)</em> with <em>x <= y</em>, and must have full rank <em>=x</em>. The LQ
factorization consists of <em>L</em> with shape <em>(x, x)</em> and <em>Q</em> with shape <em>(x, y)</em>, so
that:</p>
<blockquote>
<div><em>A</em> = <em>L</em> * <em>Q</em></div></blockquote>
<p>Here, <em>L</em> is lower triangular (upper triangle equal to zero) with nonzero diagonal,
and <em>Q</em> is row-orthonormal, meaning that</p>
<blockquote>
<div><em>Q</em> * <em>Q</em><sup>T</sup></div></blockquote>
<p>is equal to the identity matrix of shape <em>(x, x)</em>.</p>
<p>If <em>n>2</em>, <em>gelqf</em> is performed separately on the trailing two dimensions for all
inputs (batch mode).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The operator supports float32 and float64 data types only.</p>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// Single LQ factorization
A = [[1., 2., 3.], [4., 5., 6.]]
Q, L = gelqf(A)
Q = [[-0.26726124, -0.53452248, -0.80178373],
[0.87287156, 0.21821789, -0.43643578]]
L = [[-3.74165739, 0.],
[-8.55235974, 1.96396101]]
// Batch LQ factorization
A = [[[1., 2., 3.], [4., 5., 6.]],
[[7., 8., 9.], [10., 11., 12.]]]
Q, L = gelqf(A)
Q = [[[-0.26726124, -0.53452248, -0.80178373],
[0.87287156, 0.21821789, -0.43643578]],
[[-0.50257071, -0.57436653, -0.64616234],
[0.7620735, 0.05862104, -0.64483142]]]
L = [[[-3.74165739, 0.],
[-8.55235974, 1.96396101]],
[[-13.92838828, 0.],
[-19.09768702, 0.52758934]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/la_op.cc:L529</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>A</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of input matrices to be factorized</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.linalg_gemm">
<code class="descclassname">mxnet.symbol.</code><code class="descname">linalg_gemm</code><span class="sig-paren">(</span><em>A=None</em>, <em>B=None</em>, <em>C=None</em>, <em>transpose_a=_Null</em>, <em>transpose_b=_Null</em>, <em>alpha=_Null</em>, <em>beta=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.linalg_gemm" title="Permalink to this definition"></a></dt>
<dd><p>Performs general matrix multiplication and accumulation.
Input are tensors <em>A</em>, <em>B</em>, <em>C</em>, each of dimension <em>n >= 2</em> and having the same shape
on the leading <em>n-2</em> dimensions.</p>
<p>If <em>n=2</em>, the BLAS3 function <em>gemm</em> is performed:</p>
<blockquote>
<div><em>out</em> = <em>alpha</em> * <em>op</em>(<em>A</em>) * <em>op</em>(<em>B</em>) + <em>beta</em> * <em>C</em></div></blockquote>
<p>Here, <em>alpha</em> and <em>beta</em> are scalar parameters, and <em>op()</em> is either the identity or
matrix transposition (depending on <em>transpose_a</em>, <em>transpose_b</em>).</p>
<p>If <em>n>2</em>, <em>gemm</em> is performed separately on the trailing two dimensions for all inputs
(batch mode).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The operator supports float32 and float64 data types only.</p>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// Single matrix multiply-add
A = [[1.0, 1.0], [1.0, 1.0]]
B = [[1.0, 1.0], [1.0, 1.0], [1.0, 1.0]]
C = [[1.0, 1.0, 1.0], [1.0, 1.0, 1.0]]
gemm(A, B, C, transpose_b=True, alpha=2.0, beta=10.0)
= [[14.0, 14.0, 14.0], [14.0, 14.0, 14.0]]
// Batch matrix multiply-add
A = [[[1.0, 1.0]], [[0.1, 0.1]]]
B = [[[1.0, 1.0]], [[0.1, 0.1]]]
C = [[[10.0]], [[0.01]]]
gemm(A, B, C, transpose_b=True, alpha=2.0 , beta=10.0)
= [[[104.0]], [[0.14]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/la_op.cc:L69</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>A</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of input matrices</li>
<li><strong>B</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of input matrices</li>
<li><strong>C</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of input matrices</li>
<li><strong>transpose_a</strong> (<em>boolean, optional, default=0</em>) – Multiply with transposed of first input (A).</li>
<li><strong>transpose_b</strong> (<em>boolean, optional, default=0</em>) – Multiply with transposed of second input (B).</li>
<li><strong>alpha</strong> (<em>double, optional, default=1</em>) – Scalar factor multiplied with A*B.</li>
<li><strong>beta</strong> (<em>double, optional, default=1</em>) – Scalar factor multiplied with C.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.linalg_gemm2">
<code class="descclassname">mxnet.symbol.</code><code class="descname">linalg_gemm2</code><span class="sig-paren">(</span><em>A=None</em>, <em>B=None</em>, <em>transpose_a=_Null</em>, <em>transpose_b=_Null</em>, <em>alpha=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.linalg_gemm2" title="Permalink to this definition"></a></dt>
<dd><p>Performs general matrix multiplication.
Input are tensors <em>A</em>, <em>B</em>, each of dimension <em>n >= 2</em> and having the same shape
on the leading <em>n-2</em> dimensions.</p>
<p>If <em>n=2</em>, the BLAS3 function <em>gemm</em> is performed:</p>
<blockquote>
<div><em>out</em> = <em>alpha</em> * <em>op</em>(<em>A</em>) * <em>op</em>(<em>B</em>)</div></blockquote>
<p>Here <em>alpha</em> is a scalar parameter and <em>op()</em> is either the identity or the matrix
transposition (depending on <em>transpose_a</em>, <em>transpose_b</em>).</p>
<p>If <em>n>2</em>, <em>gemm</em> is performed separately on the trailing two dimensions for all inputs
(batch mode).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The operator supports float32 and float64 data types only.</p>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// Single matrix multiply
A = [[1.0, 1.0], [1.0, 1.0]]
B = [[1.0, 1.0], [1.0, 1.0], [1.0, 1.0]]
gemm2(A, B, transpose_b=True, alpha=2.0)
= [[4.0, 4.0, 4.0], [4.0, 4.0, 4.0]]
// Batch matrix multiply
A = [[[1.0, 1.0]], [[0.1, 0.1]]]
B = [[[1.0, 1.0]], [[0.1, 0.1]]]
gemm2(A, B, transpose_b=True, alpha=2.0)
= [[[4.0]], [[0.04 ]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/la_op.cc:L128</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>A</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of input matrices</li>
<li><strong>B</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of input matrices</li>
<li><strong>transpose_a</strong> (<em>boolean, optional, default=0</em>) – Multiply with transposed of first input (A).</li>
<li><strong>transpose_b</strong> (<em>boolean, optional, default=0</em>) – Multiply with transposed of second input (B).</li>
<li><strong>alpha</strong> (<em>double, optional, default=1</em>) – Scalar factor multiplied with A*B.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.linalg_potrf">
<code class="descclassname">mxnet.symbol.</code><code class="descname">linalg_potrf</code><span class="sig-paren">(</span><em>A=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.linalg_potrf" title="Permalink to this definition"></a></dt>
<dd><p>Performs Cholesky factorization of a symmetric positive-definite matrix.
Input is a tensor <em>A</em> of dimension <em>n >= 2</em>.</p>
<p>If <em>n=2</em>, the Cholesky factor <em>L</em> of the symmetric, positive definite matrix <em>A</em> is
computed. <em>L</em> is lower triangular (entries of upper triangle are all zero), has
positive diagonal entries, and:</p>
<blockquote>
<div><em>A</em> = <em>L</em> * <em>L</em><sup>T</sup></div></blockquote>
<p>If <em>n>2</em>, <em>potrf</em> is performed separately on the trailing two dimensions for all inputs
(batch mode).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The operator supports float32 and float64 data types only.</p>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// Single matrix factorization
A = [[4.0, 1.0], [1.0, 4.25]]
potrf(A) = [[2.0, 0], [0.5, 2.0]]
// Batch matrix factorization
A = [[[4.0, 1.0], [1.0, 4.25]], [[16.0, 4.0], [4.0, 17.0]]]
potrf(A) = [[[2.0, 0], [0.5, 2.0]], [[4.0, 0], [1.0, 4.0]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/la_op.cc:L178</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>A</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of input matrices to be decomposed</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.linalg_potri">
<code class="descclassname">mxnet.symbol.</code><code class="descname">linalg_potri</code><span class="sig-paren">(</span><em>A=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.linalg_potri" title="Permalink to this definition"></a></dt>
<dd><p>Performs matrix inversion from a Cholesky factorization.
Input is a tensor <em>A</em> of dimension <em>n >= 2</em>.</p>
<p>If <em>n=2</em>, <em>A</em> is a lower triangular matrix (entries of upper triangle are all zero)
with positive diagonal. We compute:</p>
<blockquote>
<div><em>out</em> = <em>A</em><sup>-T</sup> * <em>A</em><sup>-1</sup></div></blockquote>
<p>In other words, if <em>A</em> is the Cholesky factor of a symmetric positive definite matrix
<em>B</em> (obtained by <em>potrf</em>), then</p>
<blockquote>
<div><em>out</em> = <em>B</em><sup>-1</sup></div></blockquote>
<p>If <em>n>2</em>, <em>potri</em> is performed separately on the trailing two dimensions for all inputs
(batch mode).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The operator supports float32 and float64 data types only.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Use this operator only if you are certain you need the inverse of <em>B</em>, and
cannot use the Cholesky factor <em>A</em> (<em>potrf</em>), together with backsubstitution
(<em>trsm</em>). The latter is numerically much safer, and also cheaper.</p>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// Single matrix inverse
A = [[2.0, 0], [0.5, 2.0]]
potri(A) = [[0.26563, -0.0625], [-0.0625, 0.25]]
// Batch matrix inverse
A = [[[2.0, 0], [0.5, 2.0]], [[4.0, 0], [1.0, 4.0]]]
potri(A) = [[[0.26563, -0.0625], [-0.0625, 0.25]],
[[0.06641, -0.01562], [-0.01562, 0,0625]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/la_op.cc:L236</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>A</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of lower triangular matrices</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.linalg_sumlogdiag">
<code class="descclassname">mxnet.symbol.</code><code class="descname">linalg_sumlogdiag</code><span class="sig-paren">(</span><em>A=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.linalg_sumlogdiag" title="Permalink to this definition"></a></dt>
<dd><p>Computes the sum of the logarithms of the diagonal elements of a square matrix.
Input is a tensor <em>A</em> of dimension <em>n >= 2</em>.</p>
<p>If <em>n=2</em>, <em>A</em> must be square with positive diagonal entries. We sum the natural
logarithms of the diagonal elements, the result has shape (1,).</p>
<p>If <em>n>2</em>, <em>sumlogdiag</em> is performed separately on the trailing two dimensions for all
inputs (batch mode).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The operator supports float32 and float64 data types only.</p>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// Single matrix reduction
A = [[1.0, 1.0], [1.0, 7.0]]
sumlogdiag(A) = [1.9459]
// Batch matrix reduction
A = [[[1.0, 1.0], [1.0, 7.0]], [[3.0, 0], [0, 17.0]]]
sumlogdiag(A) = [1.9459, 3.9318]
</pre></div>
</div>
<p>Defined in src/operator/tensor/la_op.cc:L405</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>A</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of square matrices</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.linalg_syrk">
<code class="descclassname">mxnet.symbol.</code><code class="descname">linalg_syrk</code><span class="sig-paren">(</span><em>A=None</em>, <em>transpose=_Null</em>, <em>alpha=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.linalg_syrk" title="Permalink to this definition"></a></dt>
<dd><p>Multiplication of matrix with its transpose.
Input is a tensor <em>A</em> of dimension <em>n >= 2</em>.</p>
<p>If <em>n=2</em>, the operator performs the BLAS3 function <em>syrk</em>:</p>
<blockquote>
<div><em>out</em> = <em>alpha</em> * <em>A</em> * <em>A</em><sup>T</sup></div></blockquote>
<p>if <em>transpose=False</em>, or</p>
<blockquote>
<div><em>out</em> = <em>alpha</em> * <em>A</em><sup>T</sup> * <em>A</em></div></blockquote>
<p>if <em>transpose=True</em>.</p>
<p>If <em>n>2</em>, <em>syrk</em> is performed separately on the trailing two dimensions for all
inputs (batch mode).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The operator supports float32 and float64 data types only.</p>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// Single matrix multiply
A = [[1., 2., 3.], [4., 5., 6.]]
syrk(A, alpha=1., transpose=False)
= [[14., 32.],
[32., 77.]]
syrk(A, alpha=1., transpose=True)
= [[17., 22., 27.],
[22., 29., 36.],
[27., 36., 45.]]
// Batch matrix multiply
A = [[[1., 1.]], [[0.1, 0.1]]]
syrk(A, alpha=2., transpose=False) = [[[4.]], [[0.04]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/la_op.cc:L461</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>A</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of input matrices</li>
<li><strong>transpose</strong> (<em>boolean, optional, default=0</em>) – Use transpose of input matrix.</li>
<li><strong>alpha</strong> (<em>double, optional, default=1</em>) – Scalar factor to be applied to the result.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.linalg_trmm">
<code class="descclassname">mxnet.symbol.</code><code class="descname">linalg_trmm</code><span class="sig-paren">(</span><em>A=None</em>, <em>B=None</em>, <em>transpose=_Null</em>, <em>rightside=_Null</em>, <em>alpha=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.linalg_trmm" title="Permalink to this definition"></a></dt>
<dd><p>Performs multiplication with a lower triangular matrix.
Input are tensors <em>A</em>, <em>B</em>, each of dimension <em>n >= 2</em> and having the same shape
on the leading <em>n-2</em> dimensions.</p>
<p>If <em>n=2</em>, <em>A</em> must be lower triangular. The operator performs the BLAS3 function
<em>trmm</em>:</p>
<blockquote>
<div><em>out</em> = <em>alpha</em> * <em>op</em>(<em>A</em>) * <em>B</em></div></blockquote>
<p>if <em>rightside=False</em>, or</p>
<blockquote>
<div><em>out</em> = <em>alpha</em> * <em>B</em> * <em>op</em>(<em>A</em>)</div></blockquote>
<p>if <em>rightside=True</em>. Here, <em>alpha</em> is a scalar parameter, and <em>op()</em> is either the
identity or the matrix transposition (depending on <em>transpose</em>).</p>
<p>If <em>n>2</em>, <em>trmm</em> is performed separately on the trailing two dimensions for all inputs
(batch mode).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The operator supports float32 and float64 data types only.</p>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// Single triangular matrix multiply
A = [[1.0, 0], [1.0, 1.0]]
B = [[1.0, 1.0, 1.0], [1.0, 1.0, 1.0]]
trmm(A, B, alpha=2.0) = [[2.0, 2.0, 2.0], [4.0, 4.0, 4.0]]
// Batch triangular matrix multiply
A = [[[1.0, 0], [1.0, 1.0]], [[1.0, 0], [1.0, 1.0]]]
B = [[[1.0, 1.0, 1.0], [1.0, 1.0, 1.0]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5]]]
trmm(A, B, alpha=2.0) = [[[2.0, 2.0, 2.0], [4.0, 4.0, 4.0]],
[[1.0, 1.0, 1.0], [2.0, 2.0, 2.0]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/la_op.cc:L293</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>A</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of lower triangular matrices</li>
<li><strong>B</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of matrices</li>
<li><strong>transpose</strong> (<em>boolean, optional, default=0</em>) – Use transposed of the triangular matrix</li>
<li><strong>rightside</strong> (<em>boolean, optional, default=0</em>) – Multiply triangular matrix from the right to non-triangular one.</li>
<li><strong>alpha</strong> (<em>double, optional, default=1</em>) – Scalar factor to be applied to the result.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.linalg_trsm">
<code class="descclassname">mxnet.symbol.</code><code class="descname">linalg_trsm</code><span class="sig-paren">(</span><em>A=None</em>, <em>B=None</em>, <em>transpose=_Null</em>, <em>rightside=_Null</em>, <em>alpha=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.linalg_trsm" title="Permalink to this definition"></a></dt>
<dd><p>Solves matrix equation involving a lower triangular matrix.
Input are tensors <em>A</em>, <em>B</em>, each of dimension <em>n >= 2</em> and having the same shape
on the leading <em>n-2</em> dimensions.</p>
<p>If <em>n=2</em>, <em>A</em> must be lower triangular. The operator performs the BLAS3 function
<em>trsm</em>, solving for <em>out</em> in:</p>
<blockquote>
<div><em>op</em>(<em>A</em>) * <em>out</em> = <em>alpha</em> * <em>B</em></div></blockquote>
<p>if <em>rightside=False</em>, or</p>
<blockquote>
<div><em>out</em> * <em>op</em>(<em>A</em>) = <em>alpha</em> * <em>B</em></div></blockquote>
<p>if <em>rightside=True</em>. Here, <em>alpha</em> is a scalar parameter, and <em>op()</em> is either the
identity or the matrix transposition (depending on <em>transpose</em>).</p>
<p>If <em>n>2</em>, <em>trsm</em> is performed separately on the trailing two dimensions for all inputs
(batch mode).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The operator supports float32 and float64 data types only.</p>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>// Single matrix solve
A = [[1.0, 0], [1.0, 1.0]]
B = [[2.0, 2.0, 2.0], [4.0, 4.0, 4.0]]
trsm(A, B, alpha=0.5) = [[1.0, 1.0, 1.0], [1.0, 1.0, 1.0]]
// Batch matrix solve
A = [[[1.0, 0], [1.0, 1.0]], [[1.0, 0], [1.0, 1.0]]]
B = [[[2.0, 2.0, 2.0], [4.0, 4.0, 4.0]],
[[4.0, 4.0, 4.0], [8.0, 8.0, 8.0]]]
trsm(A, B, alpha=0.5) = [[[1.0, 1.0, 1.0], [1.0, 1.0, 1.0]],
[[2.0, 2.0, 2.0], [2.0, 2.0, 2.0]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/la_op.cc:L356</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>A</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of lower triangular matrices</li>
<li><strong>B</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Tensor of matrices</li>
<li><strong>transpose</strong> (<em>boolean, optional, default=0</em>) – Use transposed of the triangular matrix</li>
<li><strong>rightside</strong> (<em>boolean, optional, default=0</em>) – Multiply triangular matrix from the right to non-triangular one.</li>
<li><strong>alpha</strong> (<em>double, optional, default=1</em>) – Scalar factor to be applied to the result.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.log">
<code class="descclassname">mxnet.symbol.</code><code class="descname">log</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.log" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise Natural logarithmic value of the input.</p>
<p>The natural logarithm is logarithm in base <em>e</em>, so that <code class="docutils literal"><span class="pre">log(exp(x))</span> <span class="pre">=</span> <span class="pre">x</span></code></p>
<p>The storage type of <code class="docutils literal"><span class="pre">log</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L728</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.log10">
<code class="descclassname">mxnet.symbol.</code><code class="descname">log10</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.log10" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise Base-10 logarithmic value of the input.</p>
<p><code class="docutils literal"><span class="pre">10**log10(x)</span> <span class="pre">=</span> <span class="pre">x</span></code></p>
<p>The storage type of <code class="docutils literal"><span class="pre">log10</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L740</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.log1p">
<code class="descclassname">mxnet.symbol.</code><code class="descname">log1p</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.log1p" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise <code class="docutils literal"><span class="pre">log(1</span> <span class="pre">+</span> <span class="pre">x)</span></code> value of the input.</p>
<p>This function is more accurate than <code class="docutils literal"><span class="pre">log(1</span> <span class="pre">+</span> <span class="pre">x)</span></code> for small <code class="docutils literal"><span class="pre">x</span></code> so that
<span class="math">\(1+x\approx 1\)</span></p>
<p>The storage type of <code class="docutils literal"><span class="pre">log1p</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>log1p(default) = default</li>
<li>log1p(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L777</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.log2">
<code class="descclassname">mxnet.symbol.</code><code class="descname">log2</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.log2" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise Base-2 logarithmic value of the input.</p>
<p><code class="docutils literal"><span class="pre">2**log2(x)</span> <span class="pre">=</span> <span class="pre">x</span></code></p>
<p>The storage type of <code class="docutils literal"><span class="pre">log2</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L752</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.log_softmax">
<code class="descclassname">mxnet.symbol.</code><code class="descname">log_softmax</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.log_softmax" title="Permalink to this definition"></a></dt>
<dd><p>Computes the log softmax of the input.
This is equivalent to computing softmax followed by log.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="o">.</span><span class="mi">1</span><span class="p">])</span>
<span class="gp">>>> </span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">log_softmax</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([-1.41702998, -0.41702995, -2.31702995], dtype=float32)</span>
<span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">(</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="o">.</span><span class="mi">1</span><span class="p">],[</span><span class="o">.</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">]]</span> <span class="p">)</span>
<span class="gp">>>> </span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">log_softmax</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([[-0.34115392, -0.69314718, -1.24115396],</span>
<span class="go"> [-1.24115396, -0.69314718, -0.34115392]], dtype=float32)</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>axis</strong> (<em>int, optional, default='-1'</em>) – The axis along which to compute softmax.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.make_loss">
<code class="descclassname">mxnet.symbol.</code><code class="descname">make_loss</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.make_loss" title="Permalink to this definition"></a></dt>
<dd><p>Make your own loss function in network construction.</p>
<p>This operator accepts a customized loss function symbol as a terminal loss and
the symbol should be an operator with no backward dependency.
The output of this function is the gradient of loss with respect to the input data.</p>
<p>For example, if you are a making a cross entropy loss function. Assume <code class="docutils literal"><span class="pre">out</span></code> is the
predicted output and <code class="docutils literal"><span class="pre">label</span></code> is the true label, then the cross entropy can be defined as:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">cross_entropy</span> <span class="o">=</span> <span class="n">label</span> <span class="o">*</span> <span class="n">log</span><span class="p">(</span><span class="n">out</span><span class="p">)</span> <span class="o">+</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">label</span><span class="p">)</span> <span class="o">*</span> <span class="n">log</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">out</span><span class="p">)</span>
<span class="n">loss</span> <span class="o">=</span> <span class="n">make_loss</span><span class="p">(</span><span class="n">cross_entropy</span><span class="p">)</span>
</pre></div>
</div>
<p>We will need to use <code class="docutils literal"><span class="pre">make_loss</span></code> when we are creating our own loss function or we want to
combine multiple loss functions. Also we may want to stop some variables’ gradients
from backpropagation. See more detail in <code class="docutils literal"><span class="pre">BlockGrad</span></code> or <code class="docutils literal"><span class="pre">stop_gradient</span></code>.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">make_loss</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>make_loss(default) = default</li>
<li>make_loss(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L274</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.max">
<code class="descclassname">mxnet.symbol.</code><code class="descname">max</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>exclude=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.max" title="Permalink to this definition"></a></dt>
<dd><p>Computes the max of array elements over given axes.</p>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L160</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – <p>The axis or axes along which to perform the reduction.</p>
<p>The default, <cite>axis=()</cite>, will compute over all elements into a
scalar array with shape <cite>(1,)</cite>.</p>
<p>If <cite>axis</cite> is int, a reduction is performed on a particular axis.</p>
<p>If <cite>axis</cite> is a tuple of ints, a reduction is performed on all the axes
specified in the tuple.</p>
<p>If <cite>exclude</cite> is true, reduction will be performed on the axes that are
NOT in axis instead.</p>
<p>Negative values means indexing from right to left.</p>
</li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axes are left in the result as dimension with size one.</li>
<li><strong>exclude</strong> (<em>boolean, optional, default=0</em>) – Whether to perform reduction on axis that are NOT in axis instead.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.max_axis">
<code class="descclassname">mxnet.symbol.</code><code class="descname">max_axis</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>exclude=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.max_axis" title="Permalink to this definition"></a></dt>
<dd><p>Computes the max of array elements over given axes.</p>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L160</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – <p>The axis or axes along which to perform the reduction.</p>
<p>The default, <cite>axis=()</cite>, will compute over all elements into a
scalar array with shape <cite>(1,)</cite>.</p>
<p>If <cite>axis</cite> is int, a reduction is performed on a particular axis.</p>
<p>If <cite>axis</cite> is a tuple of ints, a reduction is performed on all the axes
specified in the tuple.</p>
<p>If <cite>exclude</cite> is true, reduction will be performed on the axes that are
NOT in axis instead.</p>
<p>Negative values means indexing from right to left.</p>
</li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axes are left in the result as dimension with size one.</li>
<li><strong>exclude</strong> (<em>boolean, optional, default=0</em>) – Whether to perform reduction on axis that are NOT in axis instead.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.mean">
<code class="descclassname">mxnet.symbol.</code><code class="descname">mean</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>exclude=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.mean" title="Permalink to this definition"></a></dt>
<dd><p>Computes the mean of array elements over given axes.</p>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L101</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – <p>The axis or axes along which to perform the reduction.</p>
<p>The default, <cite>axis=()</cite>, will compute over all elements into a
scalar array with shape <cite>(1,)</cite>.</p>
<p>If <cite>axis</cite> is int, a reduction is performed on a particular axis.</p>
<p>If <cite>axis</cite> is a tuple of ints, a reduction is performed on all the axes
specified in the tuple.</p>
<p>If <cite>exclude</cite> is true, reduction will be performed on the axes that are
NOT in axis instead.</p>
<p>Negative values means indexing from right to left.</p>
</li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axes are left in the result as dimension with size one.</li>
<li><strong>exclude</strong> (<em>boolean, optional, default=0</em>) – Whether to perform reduction on axis that are NOT in axis instead.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.min">
<code class="descclassname">mxnet.symbol.</code><code class="descname">min</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>exclude=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.min" title="Permalink to this definition"></a></dt>
<dd><p>Computes the min of array elements over given axes.</p>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L174</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – <p>The axis or axes along which to perform the reduction.</p>
<p>The default, <cite>axis=()</cite>, will compute over all elements into a
scalar array with shape <cite>(1,)</cite>.</p>
<p>If <cite>axis</cite> is int, a reduction is performed on a particular axis.</p>
<p>If <cite>axis</cite> is a tuple of ints, a reduction is performed on all the axes
specified in the tuple.</p>
<p>If <cite>exclude</cite> is true, reduction will be performed on the axes that are
NOT in axis instead.</p>
<p>Negative values means indexing from right to left.</p>
</li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axes are left in the result as dimension with size one.</li>
<li><strong>exclude</strong> (<em>boolean, optional, default=0</em>) – Whether to perform reduction on axis that are NOT in axis instead.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.min_axis">
<code class="descclassname">mxnet.symbol.</code><code class="descname">min_axis</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>exclude=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.min_axis" title="Permalink to this definition"></a></dt>
<dd><p>Computes the min of array elements over given axes.</p>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L174</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – <p>The axis or axes along which to perform the reduction.</p>
<p>The default, <cite>axis=()</cite>, will compute over all elements into a
scalar array with shape <cite>(1,)</cite>.</p>
<p>If <cite>axis</cite> is int, a reduction is performed on a particular axis.</p>
<p>If <cite>axis</cite> is a tuple of ints, a reduction is performed on all the axes
specified in the tuple.</p>
<p>If <cite>exclude</cite> is true, reduction will be performed on the axes that are
NOT in axis instead.</p>
<p>Negative values means indexing from right to left.</p>
</li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axes are left in the result as dimension with size one.</li>
<li><strong>exclude</strong> (<em>boolean, optional, default=0</em>) – Whether to perform reduction on axis that are NOT in axis instead.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.mp_sgd_mom_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">mp_sgd_mom_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>mom=None</em>, <em>weight32=None</em>, <em>lr=_Null</em>, <em>momentum=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.mp_sgd_mom_update" title="Permalink to this definition"></a></dt>
<dd><p>Updater function for multi-precision sgd optimizer</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Gradient</li>
<li><strong>mom</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Momentum</li>
<li><strong>weight32</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight32</li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>momentum</strong> (<em>float, optional, default=0</em>) – The decay rate of momentum estimates at each epoch.</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.mp_sgd_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">mp_sgd_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>weight32=None</em>, <em>lr=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.mp_sgd_update" title="Permalink to this definition"></a></dt>
<dd><p>Updater function for multi-precision sgd optimizer</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – gradient</li>
<li><strong>weight32</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight32</li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.nanprod">
<code class="descclassname">mxnet.symbol.</code><code class="descname">nanprod</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>exclude=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.nanprod" title="Permalink to this definition"></a></dt>
<dd><p>Computes the product of array elements over given axes treating Not a Numbers (<code class="docutils literal"><span class="pre">NaN</span></code>) as one.</p>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L146</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – <p>The axis or axes along which to perform the reduction.</p>
<p>The default, <cite>axis=()</cite>, will compute over all elements into a
scalar array with shape <cite>(1,)</cite>.</p>
<p>If <cite>axis</cite> is int, a reduction is performed on a particular axis.</p>
<p>If <cite>axis</cite> is a tuple of ints, a reduction is performed on all the axes
specified in the tuple.</p>
<p>If <cite>exclude</cite> is true, reduction will be performed on the axes that are
NOT in axis instead.</p>
<p>Negative values means indexing from right to left.</p>
</li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axes are left in the result as dimension with size one.</li>
<li><strong>exclude</strong> (<em>boolean, optional, default=0</em>) – Whether to perform reduction on axis that are NOT in axis instead.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.nansum">
<code class="descclassname">mxnet.symbol.</code><code class="descname">nansum</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>exclude=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.nansum" title="Permalink to this definition"></a></dt>
<dd><p>Computes the sum of array elements over given axes treating Not a Numbers (<code class="docutils literal"><span class="pre">NaN</span></code>) as zero.</p>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L131</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – <p>The axis or axes along which to perform the reduction.</p>
<p>The default, <cite>axis=()</cite>, will compute over all elements into a
scalar array with shape <cite>(1,)</cite>.</p>
<p>If <cite>axis</cite> is int, a reduction is performed on a particular axis.</p>
<p>If <cite>axis</cite> is a tuple of ints, a reduction is performed on all the axes
specified in the tuple.</p>
<p>If <cite>exclude</cite> is true, reduction will be performed on the axes that are
NOT in axis instead.</p>
<p>Negative values means indexing from right to left.</p>
</li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axes are left in the result as dimension with size one.</li>
<li><strong>exclude</strong> (<em>boolean, optional, default=0</em>) – Whether to perform reduction on axis that are NOT in axis instead.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.negative">
<code class="descclassname">mxnet.symbol.</code><code class="descname">negative</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.negative" title="Permalink to this definition"></a></dt>
<dd><p>Numerical negative of the argument, element-wise.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">negative</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>negative(default) = default</li>
<li>negative(row_sparse) = row_sparse</li>
<li>negative(csr) = csr</li>
</ul>
</div></blockquote>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.norm">
<code class="descclassname">mxnet.symbol.</code><code class="descname">norm</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.norm" title="Permalink to this definition"></a></dt>
<dd><p>Flattens the input array and then computes the l2 norm.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
<span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]]</span>
<span class="n">norm</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="mf">5.47722578</span><span class="p">]</span>
<span class="n">rsp</span> <span class="o">=</span> <span class="n">x</span><span class="o">.</span><span class="n">cast_storage</span><span class="p">(</span><span class="s1">'row_sparse'</span><span class="p">)</span>
<span class="n">norm</span><span class="p">(</span><span class="n">rsp</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="mf">5.47722578</span><span class="p">]</span>
<span class="n">csr</span> <span class="o">=</span> <span class="n">x</span><span class="o">.</span><span class="n">cast_storage</span><span class="p">(</span><span class="s1">'csr'</span><span class="p">)</span>
<span class="n">norm</span><span class="p">(</span><span class="n">csr</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="mf">5.47722578</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L266</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Source input</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.normal">
<code class="descclassname">mxnet.symbol.</code><code class="descname">normal</code><span class="sig-paren">(</span><em>loc=_Null</em>, <em>scale=_Null</em>, <em>shape=_Null</em>, <em>ctx=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.normal" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a normal (Gaussian) distribution.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The existing alias <code class="docutils literal"><span class="pre">normal</span></code> is deprecated.</p>
</div>
<p>Samples are distributed according to a normal distribution parametrized by <em>loc</em> (mean) and <em>scale</em> (standard deviation).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">normal</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">scale</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.89171135</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.16881478</span><span class="p">],</span>
<span class="p">[</span><span class="o">-</span><span class="mf">1.23474145</span><span class="p">,</span> <span class="mf">1.55807114</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/random/sample_op.cc:L85</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>loc</strong> (<em>float, optional, default=0</em>) – Mean of the distribution.</li>
<li><strong>scale</strong> (<em>float, optional, default=1</em>) – Standard deviation of the distribution.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape of the output.</li>
<li><strong>ctx</strong> (<em>string, optional, default=''</em>) – Context of output, in format [cpu|gpu|cpu_pinned](n). Only used for imperative calls.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.one_hot">
<code class="descclassname">mxnet.symbol.</code><code class="descname">one_hot</code><span class="sig-paren">(</span><em>indices=None</em>, <em>depth=_Null</em>, <em>on_value=_Null</em>, <em>off_value=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.one_hot" title="Permalink to this definition"></a></dt>
<dd><p>Returns a one-hot array.</p>
<p>The locations represented by <cite>indices</cite> take value <cite>on_value</cite>, while all
other locations take value <cite>off_value</cite>.</p>
<p><cite>one_hot</cite> operation with <cite>indices</cite> of shape <code class="docutils literal"><span class="pre">(i0,</span> <span class="pre">i1)</span></code> and <cite>depth</cite> of <code class="docutils literal"><span class="pre">d</span></code> would result
in an output array of shape <code class="docutils literal"><span class="pre">(i0,</span> <span class="pre">i1,</span> <span class="pre">d)</span></code> with:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">output</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">,:]</span> <span class="o">=</span> <span class="n">off_value</span>
<span class="n">output</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">,</span><span class="n">indices</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">]]</span> <span class="o">=</span> <span class="n">on_value</span>
</pre></div>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>one_hot([1,0,2,0], 3) = [[ 0. 1. 0.]
[ 1. 0. 0.]
[ 0. 0. 1.]
[ 1. 0. 0.]]
one_hot([1,0,2,0], 3, on_value=8, off_value=1,
dtype='int32') = [[1 8 1]
[8 1 1]
[1 1 8]
[8 1 1]]
one_hot([[1,0],[1,0],[2,0]], 3) = [[[ 0. 1. 0.]
[ 1. 0. 0.]]
[[ 0. 1. 0.]
[ 1. 0. 0.]]
[[ 0. 0. 1.]
[ 1. 0. 0.]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/indexing_op.cc:L472</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>indices</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – array of locations where to set on_value</li>
<li><strong>depth</strong> (<em>int, required</em>) – Depth of the one hot dimension.</li>
<li><strong>on_value</strong> (<em>double, optional, default=1</em>) – The value assigned to the locations represented by indices.</li>
<li><strong>off_value</strong> (<em>double, optional, default=0</em>) – The value assigned to the locations not represented by indices.</li>
<li><strong>dtype</strong> (<em>{'float16', 'float32', 'float64', 'int32', 'int64', 'int8', 'uint8'},optional, default='float32'</em>) – DType of the output</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.ones_like">
<code class="descclassname">mxnet.symbol.</code><code class="descname">ones_like</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.ones_like" title="Permalink to this definition"></a></dt>
<dd><p>Return an array of ones with the same shape and type
as the input array.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]]</span>
<span class="n">ones_like</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.pad">
<code class="descclassname">mxnet.symbol.</code><code class="descname">pad</code><span class="sig-paren">(</span><em>data=None</em>, <em>mode=_Null</em>, <em>pad_width=_Null</em>, <em>constant_value=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.pad" title="Permalink to this definition"></a></dt>
<dd><p>Pads an input array with a constant or edge values of the array.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>Pad</cite> is deprecated. Use <cite>pad</cite> instead.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Current implementation only supports 4D and 5D input arrays with padding applied
only on axes 1, 2 and 3. Expects axes 4 and 5 in <cite>pad_width</cite> to be zero.</p>
</div>
<p>This operation pads an input array with either a <cite>constant_value</cite> or edge values
along each axis of the input array. The amount of padding is specified by <cite>pad_width</cite>.</p>
<p><cite>pad_width</cite> is a tuple of integer padding widths for each axis of the format
<code class="docutils literal"><span class="pre">(before_1,</span> <span class="pre">after_1,</span> <span class="pre">...</span> <span class="pre">,</span> <span class="pre">before_N,</span> <span class="pre">after_N)</span></code>. The <cite>pad_width</cite> should be of length <code class="docutils literal"><span class="pre">2*N</span></code>
where <code class="docutils literal"><span class="pre">N</span></code> is the number of dimensions of the array.</p>
<p>For dimension <code class="docutils literal"><span class="pre">N</span></code> of the input array, <code class="docutils literal"><span class="pre">before_N</span></code> and <code class="docutils literal"><span class="pre">after_N</span></code> indicates how many values
to add before and after the elements of the array along dimension <code class="docutils literal"><span class="pre">N</span></code>.
The widths of the higher two dimensions <code class="docutils literal"><span class="pre">before_1</span></code>, <code class="docutils literal"><span class="pre">after_1</span></code>, <code class="docutils literal"><span class="pre">before_2</span></code>,
<code class="docutils literal"><span class="pre">after_2</span></code> must be 0.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[[[ 1. 2. 3.]
[ 4. 5. 6.]]
[[ 7. 8. 9.]
[ 10. 11. 12.]]]
[[[ 11. 12. 13.]
[ 14. 15. 16.]]
[[ 17. 18. 19.]
[ 20. 21. 22.]]]]
pad(x,mode="edge", pad_width=(0,0,0,0,1,1,1,1)) =
[[[[ 1. 1. 2. 3. 3.]
[ 1. 1. 2. 3. 3.]
[ 4. 4. 5. 6. 6.]
[ 4. 4. 5. 6. 6.]]
[[ 7. 7. 8. 9. 9.]
[ 7. 7. 8. 9. 9.]
[ 10. 10. 11. 12. 12.]
[ 10. 10. 11. 12. 12.]]]
[[[ 11. 11. 12. 13. 13.]
[ 11. 11. 12. 13. 13.]
[ 14. 14. 15. 16. 16.]
[ 14. 14. 15. 16. 16.]]
[[ 17. 17. 18. 19. 19.]
[ 17. 17. 18. 19. 19.]
[ 20. 20. 21. 22. 22.]
[ 20. 20. 21. 22. 22.]]]]
pad(x, mode="constant", constant_value=0, pad_width=(0,0,0,0,1,1,1,1)) =
[[[[ 0. 0. 0. 0. 0.]
[ 0. 1. 2. 3. 0.]
[ 0. 4. 5. 6. 0.]
[ 0. 0. 0. 0. 0.]]
[[ 0. 0. 0. 0. 0.]
[ 0. 7. 8. 9. 0.]
[ 0. 10. 11. 12. 0.]
[ 0. 0. 0. 0. 0.]]]
[[[ 0. 0. 0. 0. 0.]
[ 0. 11. 12. 13. 0.]
[ 0. 14. 15. 16. 0.]
[ 0. 0. 0. 0. 0.]]
[[ 0. 0. 0. 0. 0.]
[ 0. 17. 18. 19. 0.]
[ 0. 20. 21. 22. 0.]
[ 0. 0. 0. 0. 0.]]]]
</pre></div>
</div>
<p>Defined in src/operator/pad.cc:L766</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – An n-dimensional input array.</li>
<li><strong>mode</strong> (<em>{'constant', 'edge', 'reflect'}, required</em>) – Padding type to use. “constant” pads with <cite>constant_value</cite> “edge” pads using the edge values of the input array “reflect” pads by reflecting values with respect to the edges.</li>
<li><strong>pad_width</strong> (<em>Shape(tuple), required</em>) – Widths of the padding regions applied to the edges of each axis. It is a tuple of integer padding widths for each axis of the format <code class="docutils literal"><span class="pre">(before_1,</span> <span class="pre">after_1,</span> <span class="pre">...</span> <span class="pre">,</span> <span class="pre">before_N,</span> <span class="pre">after_N)</span></code>. It should be of length <code class="docutils literal"><span class="pre">2*N</span></code> where <code class="docutils literal"><span class="pre">N</span></code> is the number of dimensions of the array.This is equivalent to pad_width in numpy.pad, but flattened.</li>
<li><strong>constant_value</strong> (<em>double, optional, default=0</em>) – The value used for padding when <cite>mode</cite> is “constant”.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.pick">
<code class="descclassname">mxnet.symbol.</code><code class="descname">pick</code><span class="sig-paren">(</span><em>data=None</em>, <em>index=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.pick" title="Permalink to this definition"></a></dt>
<dd><p>Picks elements from an input array according to the input indices along the given axis.</p>
<p>Given an input array of shape <code class="docutils literal"><span class="pre">(d0,</span> <span class="pre">d1)</span></code> and indices of shape <code class="docutils literal"><span class="pre">(i0,)</span></code>, the result will be
an output array of shape <code class="docutils literal"><span class="pre">(i0,)</span></code> with:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">output</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="nb">input</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">indices</span><span class="p">[</span><span class="n">i</span><span class="p">]]</span>
</pre></div>
</div>
<p>By default, if any index mentioned is too large, it is replaced by the index that addresses
the last element along an axis (the <cite>clip</cite> mode).</p>
<p>This function supports n-dimensional input and (n-1)-dimensional indices arrays.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[ 1., 2.],
[ 3., 4.],
[ 5., 6.]]
// picks elements with specified indices along axis 0
pick(x, y=[0,1], 0) = [ 1., 4.]
// picks elements with specified indices along axis 1
pick(x, y=[0,1,0], 1) = [ 1., 4., 5.]
y = [[ 1.],
[ 0.],
[ 2.]]
// picks elements with specified indices along axis 1 and dims are maintained
pick(x,y, 1, keepdims=True) = [[ 2.],
[ 3.],
[ 6.]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/broadcast_reduce_op_index.cc:L145</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array</li>
<li><strong>index</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The index array</li>
<li><strong>axis</strong> (<em>int or None, optional, default='None'</em>) – The axis along which to perform the reduction. Negative values means indexing from right to left. <code class="docutils literal"><span class="pre">Requires</span> <span class="pre">axis</span> <span class="pre">to</span> <span class="pre">be</span> <span class="pre">set</span> <span class="pre">as</span> <span class="pre">int,</span> <span class="pre">because</span> <span class="pre">global</span> <span class="pre">reduction</span> <span class="pre">is</span> <span class="pre">not</span> <span class="pre">supported</span> <span class="pre">yet.</span></code></li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axis is left in the result as dimension with size one.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.prod">
<code class="descclassname">mxnet.symbol.</code><code class="descname">prod</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>exclude=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.prod" title="Permalink to this definition"></a></dt>
<dd><p>Computes the product of array elements over given axes.</p>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L116</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – <p>The axis or axes along which to perform the reduction.</p>
<p>The default, <cite>axis=()</cite>, will compute over all elements into a
scalar array with shape <cite>(1,)</cite>.</p>
<p>If <cite>axis</cite> is int, a reduction is performed on a particular axis.</p>
<p>If <cite>axis</cite> is a tuple of ints, a reduction is performed on all the axes
specified in the tuple.</p>
<p>If <cite>exclude</cite> is true, reduction will be performed on the axes that are
NOT in axis instead.</p>
<p>Negative values means indexing from right to left.</p>
</li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axes are left in the result as dimension with size one.</li>
<li><strong>exclude</strong> (<em>boolean, optional, default=0</em>) – Whether to perform reduction on axis that are NOT in axis instead.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.radians">
<code class="descclassname">mxnet.symbol.</code><code class="descname">radians</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.radians" title="Permalink to this definition"></a></dt>
<dd><p>Converts each element of the input array from degrees to radians.</p>
<div class="math">
\[radians([0, 90, 180, 270, 360]) = [0, \pi/2, \pi, 3\pi/2, 2\pi]\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">radians</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>radians(default) = default</li>
<li>radians(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L182</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random_exponential">
<code class="descclassname">mxnet.symbol.</code><code class="descname">random_exponential</code><span class="sig-paren">(</span><em>lam=_Null</em>, <em>shape=_Null</em>, <em>ctx=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.random_exponential" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from an exponential distribution.</p>
<p>Samples are distributed according to an exponential distribution parametrized by <em>lambda</em> (rate).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">exponential</span><span class="p">(</span><span class="n">lam</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.0097189</span> <span class="p">,</span> <span class="mf">0.08999364</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.04146638</span><span class="p">,</span> <span class="mf">0.31715935</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/random/sample_op.cc:L115</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lam</strong> (<em>float, optional, default=1</em>) – Lambda parameter (rate) of the exponential distribution.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape of the output.</li>
<li><strong>ctx</strong> (<em>string, optional, default=''</em>) – Context of output, in format [cpu|gpu|cpu_pinned](n). Only used for imperative calls.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random_gamma">
<code class="descclassname">mxnet.symbol.</code><code class="descname">random_gamma</code><span class="sig-paren">(</span><em>alpha=_Null</em>, <em>beta=_Null</em>, <em>shape=_Null</em>, <em>ctx=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.random_gamma" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a gamma distribution.</p>
<p>Samples are distributed according to a gamma distribution parametrized by <em>alpha</em> (shape) and <em>beta</em> (scale).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">gamma</span><span class="p">(</span><span class="n">alpha</span><span class="o">=</span><span class="mi">9</span><span class="p">,</span> <span class="n">beta</span><span class="o">=</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">7.10486984</span><span class="p">,</span> <span class="mf">3.37695289</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.91697288</span><span class="p">,</span> <span class="mf">3.65933681</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/random/sample_op.cc:L100</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>alpha</strong> (<em>float, optional, default=1</em>) – Alpha parameter (shape) of the gamma distribution.</li>
<li><strong>beta</strong> (<em>float, optional, default=1</em>) – Beta parameter (scale) of the gamma distribution.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape of the output.</li>
<li><strong>ctx</strong> (<em>string, optional, default=''</em>) – Context of output, in format [cpu|gpu|cpu_pinned](n). Only used for imperative calls.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random_generalized_negative_binomial">
<code class="descclassname">mxnet.symbol.</code><code class="descname">random_generalized_negative_binomial</code><span class="sig-paren">(</span><em>mu=_Null</em>, <em>alpha=_Null</em>, <em>shape=_Null</em>, <em>ctx=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.random_generalized_negative_binomial" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a generalized negative binomial distribution.</p>
<p>Samples are distributed according to a generalized negative binomial distribution parametrized by
<em>mu</em> (mean) and <em>alpha</em> (dispersion). <em>alpha</em> is defined as <em>1/k</em> where <em>k</em> is the failure limit of the
number of unsuccessful experiments (generalized to real numbers).
Samples will always be returned as a floating point data type.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">generalized_negative_binomial</span><span class="p">(</span><span class="n">mu</span><span class="o">=</span><span class="mf">2.0</span><span class="p">,</span> <span class="n">alpha</span><span class="o">=</span><span class="mf">0.3</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/random/sample_op.cc:L168</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>mu</strong> (<em>float, optional, default=1</em>) – Mean of the negative binomial distribution.</li>
<li><strong>alpha</strong> (<em>float, optional, default=1</em>) – Alpha (dispersion) parameter of the negative binomial distribution.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape of the output.</li>
<li><strong>ctx</strong> (<em>string, optional, default=''</em>) – Context of output, in format [cpu|gpu|cpu_pinned](n). Only used for imperative calls.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random_negative_binomial">
<code class="descclassname">mxnet.symbol.</code><code class="descname">random_negative_binomial</code><span class="sig-paren">(</span><em>k=_Null</em>, <em>p=_Null</em>, <em>shape=_Null</em>, <em>ctx=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.random_negative_binomial" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a negative binomial distribution.</p>
<p>Samples are distributed according to a negative binomial distribution parametrized by
<em>k</em> (limit of unsuccessful experiments) and <em>p</em> (failure probability in each experiment).
Samples will always be returned as a floating point data type.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">negative_binomial</span><span class="p">(</span><span class="n">k</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">p</span><span class="o">=</span><span class="mf">0.4</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/random/sample_op.cc:L149</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>k</strong> (<em>int, optional, default='1'</em>) – Limit of unsuccessful experiments.</li>
<li><strong>p</strong> (<em>float, optional, default=1</em>) – Failure probability in each experiment.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape of the output.</li>
<li><strong>ctx</strong> (<em>string, optional, default=''</em>) – Context of output, in format [cpu|gpu|cpu_pinned](n). Only used for imperative calls.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random_normal">
<code class="descclassname">mxnet.symbol.</code><code class="descname">random_normal</code><span class="sig-paren">(</span><em>loc=_Null</em>, <em>scale=_Null</em>, <em>shape=_Null</em>, <em>ctx=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.random_normal" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a normal (Gaussian) distribution.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The existing alias <code class="docutils literal"><span class="pre">normal</span></code> is deprecated.</p>
</div>
<p>Samples are distributed according to a normal distribution parametrized by <em>loc</em> (mean) and <em>scale</em> (standard deviation).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">normal</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">scale</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.89171135</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.16881478</span><span class="p">],</span>
<span class="p">[</span><span class="o">-</span><span class="mf">1.23474145</span><span class="p">,</span> <span class="mf">1.55807114</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/random/sample_op.cc:L85</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>loc</strong> (<em>float, optional, default=0</em>) – Mean of the distribution.</li>
<li><strong>scale</strong> (<em>float, optional, default=1</em>) – Standard deviation of the distribution.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape of the output.</li>
<li><strong>ctx</strong> (<em>string, optional, default=''</em>) – Context of output, in format [cpu|gpu|cpu_pinned](n). Only used for imperative calls.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random_poisson">
<code class="descclassname">mxnet.symbol.</code><code class="descname">random_poisson</code><span class="sig-paren">(</span><em>lam=_Null</em>, <em>shape=_Null</em>, <em>ctx=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.random_poisson" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a Poisson distribution.</p>
<p>Samples are distributed according to a Poisson distribution parametrized by <em>lambda</em> (rate).
Samples will always be returned as a floating point data type.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">poisson</span><span class="p">(</span><span class="n">lam</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/random/sample_op.cc:L132</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lam</strong> (<em>float, optional, default=1</em>) – Lambda parameter (rate) of the Poisson distribution.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape of the output.</li>
<li><strong>ctx</strong> (<em>string, optional, default=''</em>) – Context of output, in format [cpu|gpu|cpu_pinned](n). Only used for imperative calls.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random_uniform">
<code class="descclassname">mxnet.symbol.</code><code class="descname">random_uniform</code><span class="sig-paren">(</span><em>low=_Null</em>, <em>high=_Null</em>, <em>shape=_Null</em>, <em>ctx=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.random_uniform" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a uniform distribution.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The existing alias <code class="docutils literal"><span class="pre">uniform</span></code> is deprecated.</p>
</div>
<p>Samples are uniformly distributed over the half-open interval <em>[low, high)</em>
(includes <em>low</em>, but excludes <em>high</em>).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">uniform</span><span class="p">(</span><span class="n">low</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">high</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.60276335</span><span class="p">,</span> <span class="mf">0.85794562</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.54488319</span><span class="p">,</span> <span class="mf">0.84725171</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/random/sample_op.cc:L66</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>low</strong> (<em>float, optional, default=0</em>) – Lower bound of the distribution.</li>
<li><strong>high</strong> (<em>float, optional, default=1</em>) – Upper bound of the distribution.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape of the output.</li>
<li><strong>ctx</strong> (<em>string, optional, default=''</em>) – Context of output, in format [cpu|gpu|cpu_pinned](n). Only used for imperative calls.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.rcbrt">
<code class="descclassname">mxnet.symbol.</code><code class="descname">rcbrt</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.rcbrt" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise inverse cube-root value of the input.</p>
<div class="math">
\[rcbrt(x) = 1/\sqrt[3]{x}\]</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">rcbrt</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="o">-</span><span class="mi">125</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.2</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L693</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.reciprocal">
<code class="descclassname">mxnet.symbol.</code><code class="descname">reciprocal</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.reciprocal" title="Permalink to this definition"></a></dt>
<dd><p>Returns the reciprocal of the argument, element-wise.</p>
<p>Calculates 1/x.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">reciprocal</span><span class="p">([</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mf">1.6</span><span class="p">,</span> <span class="mf">0.2</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="mf">0.33333334</span><span class="p">,</span> <span class="mf">0.625</span><span class="p">,</span> <span class="mf">5.0</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L438</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.relu">
<code class="descclassname">mxnet.symbol.</code><code class="descname">relu</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.relu" title="Permalink to this definition"></a></dt>
<dd><p>Computes rectified linear.</p>
<div class="math">
\[max(features, 0)\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">relu</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>relu(default) = default</li>
<li>relu(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L84</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.repeat">
<code class="descclassname">mxnet.symbol.</code><code class="descname">repeat</code><span class="sig-paren">(</span><em>data=None</em>, <em>repeats=_Null</em>, <em>axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.repeat" title="Permalink to this definition"></a></dt>
<dd><p>Repeats elements of an array.</p>
<p>By default, <code class="docutils literal"><span class="pre">repeat</span></code> flattens the input array into 1-D and then repeats the
elements:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
<span class="p">[</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]]</span>
<span class="n">repeat</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">repeats</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]</span>
</pre></div>
</div>
<p>The parameter <code class="docutils literal"><span class="pre">axis</span></code> specifies the axis along which to perform repeat:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">repeat</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">repeats</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]</span>
<span class="n">repeat</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">repeats</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]</span>
<span class="n">repeat</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">repeats</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">axis</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/matrix_op.cc:L615</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data array</li>
<li><strong>repeats</strong> (<em>int, required</em>) – The number of repetitions for each element.</li>
<li><strong>axis</strong> (<em>int or None, optional, default='None'</em>) – The axis along which to repeat values. The negative numbers are interpreted counting from the backward. By default, use the flattened input array, and return a flat output array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.reshape">
<code class="descclassname">mxnet.symbol.</code><code class="descname">reshape</code><span class="sig-paren">(</span><em>data=None</em>, <em>shape=_Null</em>, <em>reverse=_Null</em>, <em>target_shape=_Null</em>, <em>keep_highest=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.reshape" title="Permalink to this definition"></a></dt>
<dd><p>Reshapes the input array.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">Reshape</span></code> is deprecated, use <code class="docutils literal"><span class="pre">reshape</span></code></p>
</div>
<p>Given an array and a shape, this function returns a copy of the array in the new shape.
The shape is a tuple of integers such as (2,3,4).The size of the new shape should be same as the size of the input array.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">reshape</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">],</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">],</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]]</span>
</pre></div>
</div>
<p>Some dimensions of the shape can take special values from the set {0, -1, -2, -3, -4}. The significance of each is explained below:</p>
<ul>
<li><p class="first"><code class="docutils literal"><span class="pre">0</span></code> copy this dimension from the input to the output shape.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- input shape = (2,3,4), shape = (4,0,2), output shape = (4,3,2)
- input shape = (2,3,4), shape = (2,0,0), output shape = (2,3,4)
</pre></div>
</div>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">-1</span></code> infers the dimension of the output shape by using the remainder of the input dimensions
keeping the size of the new array same as that of the input array.
At most one dimension of shape can be -1.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- input shape = (2,3,4), shape = (6,1,-1), output shape = (6,1,4)
- input shape = (2,3,4), shape = (3,-1,8), output shape = (3,1,8)
- input shape = (2,3,4), shape=(-1,), output shape = (24,)
</pre></div>
</div>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">-2</span></code> copy all/remainder of the input dimensions to the output shape.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- input shape = (2,3,4), shape = (-2,), output shape = (2,3,4)
- input shape = (2,3,4), shape = (2,-2), output shape = (2,3,4)
- input shape = (2,3,4), shape = (-2,1,1), output shape = (2,3,4,1,1)
</pre></div>
</div>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">-3</span></code> use the product of two consecutive dimensions of the input shape as the output dimension.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- input shape = (2,3,4), shape = (-3,4), output shape = (6,4)
- input shape = (2,3,4,5), shape = (-3,-3), output shape = (6,20)
- input shape = (2,3,4), shape = (0,-3), output shape = (2,12)
- input shape = (2,3,4), shape = (-3,-2), output shape = (6,4)
</pre></div>
</div>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">-4</span></code> split one dimension of the input into two dimensions passed subsequent to -4 in shape (can contain -1).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- input shape = (2,3,4), shape = (-4,1,2,-2), output shape =(1,2,3,4)
- input shape = (2,3,4), shape = (2,-4,-1,3,-2), output shape = (2,1,3,4)
</pre></div>
</div>
</li>
</ul>
<p>If the argument <cite>reverse</cite> is set to 1, then the special values are inferred from right to left.</p>
<blockquote>
<div><p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>- without reverse=1, for input shape = (10,5,4), shape = (-1,0), output shape would be (40,5)
- with reverse=1, output shape will be (50,4).
</pre></div>
</div>
</div></blockquote>
<p>Defined in src/operator/tensor/matrix_op.cc:L167</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data to reshape.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – The target shape</li>
<li><strong>reverse</strong> (<em>boolean, optional, default=0</em>) – If true then the special values are inferred from right to left</li>
<li><strong>target_shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – (Deprecated! Use <code class="docutils literal"><span class="pre">shape</span></code> instead.) Target new shape. One and only one dim can be 0, in which case it will be inferred from the rest of dims</li>
<li><strong>keep_highest</strong> (<em>boolean, optional, default=0</em>) – (Deprecated! Use <code class="docutils literal"><span class="pre">shape</span></code> instead.) Whether keep the highest dim unchanged.If set to true, then the first dim in target_shape is ignored,and always fixed as input</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.reshape_like">
<code class="descclassname">mxnet.symbol.</code><code class="descname">reshape_like</code><span class="sig-paren">(</span><em>lhs=None</em>, <em>rhs=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.reshape_like" title="Permalink to this definition"></a></dt>
<dd><p>Reshape lhs to have the same shape as rhs.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – First input.</li>
<li><strong>rhs</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Second input.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.reverse">
<code class="descclassname">mxnet.symbol.</code><code class="descname">reverse</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.reverse" title="Permalink to this definition"></a></dt>
<dd><p>Reverses the order of elements along given axis while preserving array shape.</p>
<p>Note: reverse and flip are equivalent. We use reverse in the following examples.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">9.</span><span class="p">]]</span>
<span class="n">reverse</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">9.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]</span>
<span class="n">reverse</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">9.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/matrix_op.cc:L717</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data array</li>
<li><strong>axis</strong> (<em>Shape(tuple), required</em>) – The axis which to reverse elements.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.rint">
<code class="descclassname">mxnet.symbol.</code><code class="descname">rint</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.rint" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise rounded value to the nearest integer of the input.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li>For input <code class="docutils literal"><span class="pre">n.5</span></code> <code class="docutils literal"><span class="pre">rint</span></code> returns <code class="docutils literal"><span class="pre">n</span></code> while <code class="docutils literal"><span class="pre">round</span></code> returns <code class="docutils literal"><span class="pre">n+1</span></code>.</li>
<li>For input <code class="docutils literal"><span class="pre">-n.5</span></code> both <code class="docutils literal"><span class="pre">rint</span></code> and <code class="docutils literal"><span class="pre">round</span></code> returns <code class="docutils literal"><span class="pre">-n-1</span></code>.</li>
</ul>
</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">rint</span><span class="p">([</span><span class="o">-</span><span class="mf">1.5</span><span class="p">,</span> <span class="mf">1.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.9</span><span class="p">,</span> <span class="mf">1.9</span><span class="p">,</span> <span class="mf">2.1</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="o">-</span><span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="o">-</span><span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">rint</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>rint(default) = default</li>
<li>rint(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L519</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.rmsprop_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">rmsprop_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>n=None</em>, <em>lr=_Null</em>, <em>gamma1=_Null</em>, <em>epsilon=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>clip_weights=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.rmsprop_update" title="Permalink to this definition"></a></dt>
<dd><p>Update function for <cite>RMSProp</cite> optimizer.</p>
<p><cite>RMSprop</cite> is a variant of stochastic gradient descent where the gradients are
divided by a cache which grows with the sum of squares of recent gradients?</p>
<p><cite>RMSProp</cite> is similar to <cite>AdaGrad</cite>, a popular variant of <cite>SGD</cite> which adaptively
tunes the learning rate of each parameter. <cite>AdaGrad</cite> lowers the learning rate for
each parameter monotonically over the course of training.
While this is analytically motivated for convex optimizations, it may not be ideal
for non-convex problems. <cite>RMSProp</cite> deals with this heuristically by allowing the
learning rates to rebound as the denominator decays over time.</p>
<p>Define the Root Mean Square (RMS) error criterion of the gradient as
<span class="math">\(RMS[g]_t = \sqrt{E[g^2]_t + \epsilon}\)</span>, where <span class="math">\(g\)</span> represents
gradient and <span class="math">\(E[g^2]_t\)</span> is the decaying average over past squared gradient.</p>
<p>The <span class="math">\(E[g^2]_t\)</span> is given by:</p>
<div class="math">
\[E[g^2]_t = \gamma * E[g^2]_{t-1} + (1-\gamma) * g_t^2\]</div>
<p>The update step is</p>
<div class="math">
\[\theta_{t+1} = \theta_t - \frac{\eta}{RMS[g]_t} g_t\]</div>
<p>The RMSProp code follows the version in
<a class="reference external" href="http://www.cs.toronto.edu/~tijmen/csc321/slides/lecture_slides_lec6.pdf">http://www.cs.toronto.edu/~tijmen/csc321/slides/lecture_slides_lec6.pdf</a>
Tieleman &amp; Hinton, 2012.</p>
<p>Hinton suggests the momentum term <span class="math">\(\gamma\)</span> to be 0.9 and the learning rate
<span class="math">\(\eta\)</span> to be 0.001.</p>
<p>Defined in src/operator/optimizer_op.cc:L441</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Gradient</li>
<li><strong>n</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – n</li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>gamma1</strong> (<em>float, optional, default=0.95</em>) – The decay rate of momentum estimates.</li>
<li><strong>epsilon</strong> (<em>float, optional, default=1e-08</em>) – A small constant for numerical stability.</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>clip_weights</strong> (<em>float, optional, default=-1</em>) – Clip weights to the range of [-clip_weights, clip_weights] If clip_weights <= 0, weight clipping is turned off. weights = max(min(weights, clip_weights), -clip_weights).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.rmspropalex_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">rmspropalex_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>n=None</em>, <em>g=None</em>, <em>delta=None</em>, <em>lr=_Null</em>, <em>gamma1=_Null</em>, <em>gamma2=_Null</em>, <em>epsilon=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>clip_weights=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.rmspropalex_update" title="Permalink to this definition"></a></dt>
<dd><p>Update function for RMSPropAlex optimizer.</p>
<p><cite>RMSPropAlex</cite> is non-centered version of <cite>RMSProp</cite>.</p>
<p>Define <span class="math">\(E[g^2]_t\)</span> is the decaying average over past squared gradient and
<span class="math">\(E[g]_t\)</span> is the decaying average over past gradient.</p>
<div class="math">
\[\begin{split}E[g^2]_t = \gamma_1 * E[g^2]_{t-1} + (1 - \gamma_1) * g_t^2\\
E[g]_t = \gamma_1 * E[g]_{t-1} + (1 - \gamma_1) * g_t\\
\Delta_t = \gamma_2 * \Delta_{t-1} - \frac{\eta}{\sqrt{E[g^2]_t - E[g]_t^2 + \epsilon}} g_t\\\end{split}\]</div>
<p>The update step is</p>
<div class="math">
\[\theta_{t+1} = \theta_t + \Delta_t\]</div>
<p>The RMSPropAlex code follows the version in
<a class="reference external" href="http://arxiv.org/pdf/1308.0850v5.pdf">http://arxiv.org/pdf/1308.0850v5.pdf</a> Eq(38) - Eq(45) by Alex Graves, 2013.</p>
<p>Graves suggests the momentum term <span class="math">\(\gamma_1\)</span> to be 0.95, <span class="math">\(\gamma_2\)</span>
to be 0.9 and the learning rate <span class="math">\(\eta\)</span> to be 0.0001.</p>
<p>Defined in src/operator/optimizer_op.cc:L480</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Gradient</li>
<li><strong>n</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – n</li>
<li><strong>g</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – g</li>
<li><strong>delta</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – delta</li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>gamma1</strong> (<em>float, optional, default=0.95</em>) – Decay rate.</li>
<li><strong>gamma2</strong> (<em>float, optional, default=0.9</em>) – Decay rate.</li>
<li><strong>epsilon</strong> (<em>float, optional, default=1e-08</em>) – A small constant for numerical stability.</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>clip_weights</strong> (<em>float, optional, default=-1</em>) – Clip weights to the range of [-clip_weights, clip_weights] If clip_weights <= 0, weight clipping is turned off. weights = max(min(weights, clip_weights), -clip_weights).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.round">
<code class="descclassname">mxnet.symbol.</code><code class="descname">round</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.round" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise rounded value to the nearest integer of the input.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="nb">round</span><span class="p">([</span><span class="o">-</span><span class="mf">1.5</span><span class="p">,</span> <span class="mf">1.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.9</span><span class="p">,</span> <span class="mf">1.9</span><span class="p">,</span> <span class="mf">2.1</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="o">-</span><span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="o">-</span><span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">round</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>round(default) = default</li>
<li>round(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L498</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.rsqrt">
<code class="descclassname">mxnet.symbol.</code><code class="descname">rsqrt</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.rsqrt" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise inverse square-root value of the input.</p>
<div class="math">
\[rsqrt(x) = 1/\sqrt{x}\]</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">rsqrt</span><span class="p">([</span><span class="mi">4</span><span class="p">,</span><span class="mi">9</span><span class="p">,</span><span class="mi">16</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.33333334</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">rsqrt</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L659</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sample_exponential">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sample_exponential</code><span class="sig-paren">(</span><em>lam=None</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sample_exponential" title="Permalink to this definition"></a></dt>
<dd><p>Concurrent sampling from multiple
exponential distributions with parameters lambda (rate).</p>
<p>The parameters of the distributions are provided as an input array.
Let <em>[s]</em> be the shape of the input array, <em>n</em> be the dimension of <em>[s]</em>, <em>[t]</em>
be the shape specified as the parameter of the operator, and <em>m</em> be the dimension
of <em>[t]</em>. Then the output will be a <em>(n+m)</em>-dimensional array with shape <em>[s]x[t]</em>.</p>
<p>For any valid <em>n</em>-dimensional index <em>i</em> with respect to the input array, <em>output[i]</em>
will be an <em>m</em>-dimensional array that holds randomly drawn samples from the distribution
which is parameterized by the input value at index <em>i</em>. If the shape parameter of the
operator is not set, then one sample will be drawn per distribution and the output array
has the same shape as the input array.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>lam = [ 1.0, 8.5 ]
// Draw a single sample for each distribution
sample_exponential(lam) = [ 0.51837951, 0.09994757]
// Draw a vector containing two samples for each distribution
sample_exponential(lam, shape=(2)) = [[ 0.51837951, 0.19866663],
[ 0.09994757, 0.50447971]]
</pre></div>
</div>
<p>Defined in src/operator/random/multisample_op.cc:L284</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lam</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Lambda (rate) parameters of the distributions.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape to be sampled from each random distribution.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sample_gamma">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sample_gamma</code><span class="sig-paren">(</span><em>alpha=None</em>, <em>beta=None</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sample_gamma" title="Permalink to this definition"></a></dt>
<dd><p>Concurrent sampling from multiple
gamma distributions with parameters <em>alpha</em> (shape) and <em>beta</em> (scale).</p>
<p>The parameters of the distributions are provided as input arrays.
Let <em>[s]</em> be the shape of the input arrays, <em>n</em> be the dimension of <em>[s]</em>, <em>[t]</em>
be the shape specified as the parameter of the operator, and <em>m</em> be the dimension
of <em>[t]</em>. Then the output will be a <em>(n+m)</em>-dimensional array with shape <em>[s]x[t]</em>.</p>
<p>For any valid <em>n</em>-dimensional index <em>i</em> with respect to the input arrays, <em>output[i]</em>
will be an <em>m</em>-dimensional array that holds randomly drawn samples from the distribution
which is parameterized by the input values at index <em>i</em>. If the shape parameter of the
operator is not set, then one sample will be drawn per distribution and the output array
has the same shape as the input arrays.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>alpha = [ 0.0, 2.5 ]
beta = [ 1.0, 0.7 ]
// Draw a single sample for each distribution
sample_gamma(alpha, beta) = [ 0. , 2.25797319]
// Draw a vector containing two samples for each distribution
sample_gamma(alpha, beta, shape=(2)) = [[ 0. , 0. ],
[ 2.25797319, 1.70734084]]
</pre></div>
</div>
<p>Defined in src/operator/random/multisample_op.cc:L282</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>alpha</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Alpha (shape) parameters of the distributions.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape to be sampled from each random distribution.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>beta</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Beta (scale) parameters of the distributions.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sample_generalized_negative_binomial">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sample_generalized_negative_binomial</code><span class="sig-paren">(</span><em>mu=None</em>, <em>alpha=None</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sample_generalized_negative_binomial" title="Permalink to this definition"></a></dt>
<dd><p>Concurrent sampling from multiple
generalized negative binomial distributions with parameters <em>mu</em> (mean) and <em>alpha</em> (dispersion).</p>
<p>The parameters of the distributions are provided as input arrays.
Let <em>[s]</em> be the shape of the input arrays, <em>n</em> be the dimension of <em>[s]</em>, <em>[t]</em>
be the shape specified as the parameter of the operator, and <em>m</em> be the dimension
of <em>[t]</em>. Then the output will be a <em>(n+m)</em>-dimensional array with shape <em>[s]x[t]</em>.</p>
<p>For any valid <em>n</em>-dimensional index <em>i</em> with respect to the input arrays, <em>output[i]</em>
will be an <em>m</em>-dimensional array that holds randomly drawn samples from the distribution
which is parameterized by the input values at index <em>i</em>. If the shape parameter of the
operator is not set, then one sample will be drawn per distribution and the output array
has the same shape as the input arrays.</p>
<p>Samples will always be returned as a floating point data type.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>mu = [ 2.0, 2.5 ]
alpha = [ 1.0, 0.1 ]
// Draw a single sample for each distribution
sample_generalized_negative_binomial(mu, alpha) = [ 0., 3.]
// Draw a vector containing two samples for each distribution
sample_generalized_negative_binomial(mu, alpha, shape=(2)) = [[ 0., 3.],
[ 3., 1.]]
</pre></div>
</div>
<p>Defined in src/operator/random/multisample_op.cc:L293</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>mu</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Means of the distributions.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape to be sampled from each random distribution.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>alpha</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Alpha (dispersion) parameters of the distributions.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sample_multinomial">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sample_multinomial</code><span class="sig-paren">(</span><em>data=None</em>, <em>shape=_Null</em>, <em>get_prob=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sample_multinomial" title="Permalink to this definition"></a></dt>
<dd><p>Concurrent sampling from multiple multinomial distributions.</p>
<p><em>data</em> is an <em>n</em> dimensional array whose last dimension has length <em>k</em>, where
<em>k</em> is the number of possible outcomes of each multinomial distribution. This
operator will draw <em>shape</em> samples from each distribution. If shape is empty
one sample will be drawn from each distribution.</p>
<p>If <em>get_prob</em> is true, a second array containing log likelihood of the drawn
samples will also be returned. This is usually used for reinforcement learning
where you can provide reward as head gradient for this array to estimate
gradient.</p>
<p>Note that the input distribution must be normalized, i.e. <em>data</em> must sum to
1 along its last axis.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>probs = [[0, 0.1, 0.2, 0.3, 0.4], [0.4, 0.3, 0.2, 0.1, 0]]
// Draw a single sample for each distribution
sample_multinomial(probs) = [3, 0]
// Draw a vector containing two samples for each distribution
sample_multinomial(probs, shape=(2)) = [[4, 2],
[0, 0]]
// requests log likelihood
sample_multinomial(probs, get_prob=True) = [2, 1], [0.2, 0.3]
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Distribution probabilities. Must sum to one on the last axis.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape to be sampled from each random distribution.</li>
<li><strong>get_prob</strong> (<em>boolean, optional, default=0</em>) – Whether to also return the log probability of sampled result. This is usually used for differentiating through stochastic variables, e.g. in reinforcement learning.</li>
<li><strong>dtype</strong> (<em>{'int32'},optional, default='int32'</em>) – DType of the output in case this can’t be inferred. Only support int32 for now.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sample_negative_binomial">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sample_negative_binomial</code><span class="sig-paren">(</span><em>k=None</em>, <em>p=None</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sample_negative_binomial" title="Permalink to this definition"></a></dt>
<dd><p>Concurrent sampling from multiple
negative binomial distributions with parameters <em>k</em> (failure limit) and <em>p</em> (failure probability).</p>
<p>The parameters of the distributions are provided as input arrays.
Let <em>[s]</em> be the shape of the input arrays, <em>n</em> be the dimension of <em>[s]</em>, <em>[t]</em>
be the shape specified as the parameter of the operator, and <em>m</em> be the dimension
of <em>[t]</em>. Then the output will be a <em>(n+m)</em>-dimensional array with shape <em>[s]x[t]</em>.</p>
<p>For any valid <em>n</em>-dimensional index <em>i</em> with respect to the input arrays, <em>output[i]</em>
will be an <em>m</em>-dimensional array that holds randomly drawn samples from the distribution
which is parameterized by the input values at index <em>i</em>. If the shape parameter of the
operator is not set, then one sample will be drawn per distribution and the output array
has the same shape as the input arrays.</p>
<p>Samples will always be returned as a floating point data type.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>k = [ 20, 49 ]
p = [ 0.4 , 0.77 ]
// Draw a single sample for each distribution
sample_negative_binomial(k, p) = [ 15., 16.]
// Draw a vector containing two samples for each distribution
sample_negative_binomial(k, p, shape=(2)) = [[ 15., 50.],
[ 16., 12.]]
</pre></div>
</div>
<p>Defined in src/operator/random/multisample_op.cc:L289</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>k</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Limits of unsuccessful experiments.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape to be sampled from each random distribution.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>p</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Failure probabilities in each experiment.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sample_normal">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sample_normal</code><span class="sig-paren">(</span><em>mu=None</em>, <em>sigma=None</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sample_normal" title="Permalink to this definition"></a></dt>
<dd><p>Concurrent sampling from multiple
normal distributions with parameters <em>mu</em> (mean) and <em>sigma</em> (standard deviation).</p>
<p>The parameters of the distributions are provided as input arrays.
Let <em>[s]</em> be the shape of the input arrays, <em>n</em> be the dimension of <em>[s]</em>, <em>[t]</em>
be the shape specified as the parameter of the operator, and <em>m</em> be the dimension
of <em>[t]</em>. Then the output will be a <em>(n+m)</em>-dimensional array with shape <em>[s]x[t]</em>.</p>
<p>For any valid <em>n</em>-dimensional index <em>i</em> with respect to the input arrays, <em>output[i]</em>
will be an <em>m</em>-dimensional array that holds randomly drawn samples from the distribution
which is parameterized by the input values at index <em>i</em>. If the shape parameter of the
operator is not set, then one sample will be drawn per distribution and the output array
has the same shape as the input arrays.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>mu = [ 0.0, 2.5 ]
sigma = [ 1.0, 3.7 ]
// Draw a single sample for each distribution
sample_normal(mu, sigma) = [-0.56410581, 0.95934606]
// Draw a vector containing two samples for each distribution
sample_normal(mu, sigma, shape=(2)) = [[-0.56410581, 0.2928229 ],
[ 0.95934606, 4.48287058]]
</pre></div>
</div>
<p>Defined in src/operator/random/multisample_op.cc:L279</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>mu</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Means of the distributions.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape to be sampled from each random distribution.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>sigma</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Standard deviations of the distributions.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sample_poisson">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sample_poisson</code><span class="sig-paren">(</span><em>lam=None</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sample_poisson" title="Permalink to this definition"></a></dt>
<dd><p>Concurrent sampling from multiple
Poisson distributions with parameters lambda (rate).</p>
<p>The parameters of the distributions are provided as an input array.
Let <em>[s]</em> be the shape of the input array, <em>n</em> be the dimension of <em>[s]</em>, <em>[t]</em>
be the shape specified as the parameter of the operator, and <em>m</em> be the dimension
of <em>[t]</em>. Then the output will be a <em>(n+m)</em>-dimensional array with shape <em>[s]x[t]</em>.</p>
<p>For any valid <em>n</em>-dimensional index <em>i</em> with respect to the input array, <em>output[i]</em>
will be an <em>m</em>-dimensional array that holds randomly drawn samples from the distribution
which is parameterized by the input value at index <em>i</em>. If the shape parameter of the
operator is not set, then one sample will be drawn per distribution and the output array
has the same shape as the input array.</p>
<p>Samples will always be returned as a floating point data type.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>lam = [ 1.0, 8.5 ]
// Draw a single sample for each distribution
sample_poisson(lam) = [ 0., 13.]
// Draw a vector containing two samples for each distribution
sample_poisson(lam, shape=(2)) = [[ 0., 4.],
[ 13., 8.]]
</pre></div>
</div>
<p>Defined in src/operator/random/multisample_op.cc:L286</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lam</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Lambda (rate) parameters of the distributions.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape to be sampled from each random distribution.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sample_uniform">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sample_uniform</code><span class="sig-paren">(</span><em>low=None</em>, <em>high=None</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sample_uniform" title="Permalink to this definition"></a></dt>
<dd><p>Concurrent sampling from multiple
uniform distributions on the intervals given by <em>[low,high)</em>.</p>
<p>The parameters of the distributions are provided as input arrays.
Let <em>[s]</em> be the shape of the input arrays, <em>n</em> be the dimension of <em>[s]</em>, <em>[t]</em>
be the shape specified as the parameter of the operator, and <em>m</em> be the dimension
of <em>[t]</em>. Then the output will be a <em>(n+m)</em>-dimensional array with shape <em>[s]x[t]</em>.</p>
<p>For any valid <em>n</em>-dimensional index <em>i</em> with respect to the input arrays, <em>output[i]</em>
will be an <em>m</em>-dimensional array that holds randomly drawn samples from the distribution
which is parameterized by the input values at index <em>i</em>. If the shape parameter of the
operator is not set, then one sample will be drawn per distribution and the output array
has the same shape as the input arrays.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>low = [ 0.0, 2.5 ]
high = [ 1.0, 3.7 ]
// Draw a single sample for each distribution
sample_uniform(low, high) = [ 0.40451524, 3.18687344]
// Draw a vector containing two samples for each distribution
sample_uniform(low, high, shape=(2)) = [[ 0.40451524, 0.18017688],
[ 3.18687344, 3.68352246]]
</pre></div>
</div>
<p>Defined in src/operator/random/multisample_op.cc:L277</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>low</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Lower bounds of the distributions.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape to be sampled from each random distribution.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>high</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Upper bounds of the distributions.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.scatter_nd">
<code class="descclassname">mxnet.symbol.</code><code class="descname">scatter_nd</code><span class="sig-paren">(</span><em>data=None</em>, <em>indices=None</em>, <em>shape=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.scatter_nd" title="Permalink to this definition"></a></dt>
<dd><p>Scatters data into a new tensor according to indices.</p>
<p>Given <cite>data</cite> with shape <cite>(Y_0, ..., Y_{K-1}, X_M, ..., X_{N-1})</cite> and indices with shape
<cite>(M, Y_0, ..., Y_{K-1})</cite>, the output will have shape <cite>(X_0, X_1, ..., X_{N-1})</cite>,
where <cite>M <= N</cite>. If <cite>M == N</cite>, data shape should simply be <cite>(Y_0, ..., Y_{K-1})</cite>.</p>
<p>The elements in output is defined as follows:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>output[indices[0, y_0, ..., y_{K-1}],
...,
indices[M-1, y_0, ..., y_{K-1}],
x_M, ..., x_{N-1}] = data[y_0, ..., y_{K-1}, x_M, ..., x_{N-1}]
</pre></div>
</div>
<p>all other entries in output are 0.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">If the indices have duplicates, the result will be non-deterministic and
the gradient of <cite>scatter_nd</cite> will not be correct!!</p>
</div>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">data</span> <span class="o">=</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">]</span>
<span class="n">indices</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">]]</span>
<span class="n">shape</span> <span class="o">=</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="n">scatter_nd</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">indices</span><span class="p">,</span> <span class="n">shape</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">]]</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – data</li>
<li><strong>indices</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – indices</li>
<li><strong>shape</strong> (<em>Shape(tuple), required</em>) – Shape of output.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sgd_mom_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sgd_mom_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>mom=None</em>, <em>lr=_Null</em>, <em>momentum=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sgd_mom_update" title="Permalink to this definition"></a></dt>
<dd><p>Momentum update function for Stochastic Gradient Descent (SDG) optimizer.</p>
<p>Momentum update has better convergence rates on neural networks. Mathematically it looks
like below:</p>
<div class="math">
\[\begin{split}v_1 = \alpha * \nabla J(W_0)\\
v_t = \gamma v_{t-1} - \alpha * \nabla J(W_{t-1})\\
W_t = W_{t-1} + v_t\end{split}\]</div>
<p>It updates the weights using:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">v</span> <span class="o">=</span> <span class="n">momentum</span> <span class="o">*</span> <span class="n">v</span> <span class="o">-</span> <span class="n">learning_rate</span> <span class="o">*</span> <span class="n">gradient</span>
<span class="n">weight</span> <span class="o">+=</span> <span class="n">v</span>
</pre></div>
</div>
<p>Where the parameter <code class="docutils literal"><span class="pre">momentum</span></code> is the decay rate of momentum estimates at each epoch.</p>
<p>If weight and grad are both of <code class="docutils literal"><span class="pre">row_sparse</span></code> storage type and momentum is of <code class="docutils literal"><span class="pre">default</span></code> storage type,
standard update is applied.</p>
<p>If weight, grad and momentum are all of <code class="docutils literal"><span class="pre">row_sparse</span></code> storage type,
only the row slices whose indices appear in grad.indices are updated (for both weight and momentum):</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">gradient</span><span class="o">.</span><span class="n">indices</span><span class="p">:</span>
<span class="n">v</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">=</span> <span class="n">momentum</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">*</span> <span class="n">v</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">-</span> <span class="n">learning_rate</span> <span class="o">*</span> <span class="n">gradient</span><span class="p">[</span><span class="n">row</span><span class="p">]</span>
<span class="n">weight</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">+=</span> <span class="n">v</span><span class="p">[</span><span class="n">row</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/optimizer_op.cc:L265</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Gradient</li>
<li><strong>mom</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Momentum</li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>momentum</strong> (<em>float, optional, default=0</em>) – The decay rate of momentum estimates at each epoch.</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sgd_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sgd_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>lr=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sgd_update" title="Permalink to this definition"></a></dt>
<dd><p>Update function for Stochastic Gradient Descent (SDG) optimizer.</p>
<p>It updates the weights using:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">weight</span> <span class="o">=</span> <span class="n">weight</span> <span class="o">-</span> <span class="n">learning_rate</span> <span class="o">*</span> <span class="n">gradient</span>
</pre></div>
</div>
<p>If weight is of <code class="docutils literal"><span class="pre">row_sparse</span></code> storage type,
only the row slices whose indices appear in grad.indices are updated:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">gradient</span><span class="o">.</span><span class="n">indices</span><span class="p">:</span>
<span class="n">weight</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">=</span> <span class="n">weight</span><span class="p">[</span><span class="n">row</span><span class="p">]</span> <span class="o">-</span> <span class="n">learning_rate</span> <span class="o">*</span> <span class="n">gradient</span><span class="p">[</span><span class="n">row</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/optimizer_op.cc:L222</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Gradient</li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sigmoid">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sigmoid</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sigmoid" title="Permalink to this definition"></a></dt>
<dd><p>Computes sigmoid of x element-wise.</p>
<div class="math">
\[y = 1 / (1 + exp(-x))\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">sigmoid</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L103</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sign">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sign</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sign" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise sign of the input.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">sign</span><span class="p">([</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">3</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">sign</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>sign(default) = default</li>
<li>sign(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L479</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.signsgd_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">signsgd_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>lr=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.signsgd_update" title="Permalink to this definition"></a></dt>
<dd><p>Update function for SignSGD optimizer.
.. math:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>g_t = \nabla J(W_{t-1})\\
W_t = W_{t-1} - \eta_t \text{sign}(g_t)}
</pre></div>
</div>
<p>It updates the weights using:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">weight</span> <span class="o">=</span> <span class="n">weight</span> <span class="o">-</span> <span class="n">learning_rate</span> <span class="o">*</span> <span class="n">sign</span><span class="p">(</span><span class="n">gradient</span><span class="p">)</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li>sparse ndarray not supported for this optimizer yet.</li>
</ul>
</div>
<p>Defined in src/operator/optimizer_op.cc:L55</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Gradient</li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.signum_update">
<code class="descclassname">mxnet.symbol.</code><code class="descname">signum_update</code><span class="sig-paren">(</span><em>weight=None</em>, <em>grad=None</em>, <em>mom=None</em>, <em>lr=_Null</em>, <em>momentum=_Null</em>, <em>wd=_Null</em>, <em>rescale_grad=_Null</em>, <em>clip_gradient=_Null</em>, <em>wd_lh=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.signum_update" title="Permalink to this definition"></a></dt>
<dd><p>SIGN momentUM (Signum) optimizer.</p>
<div class="math">
\[\begin{split}g_t = \nabla J(W_{t-1})\\
m_t = \beta m_{t-1} + (1 - \beta) g_t\\
W_t = W_{t-1} - \eta_t \text{sign}(m_t)}\end{split}\]</div>
<dl class="docutils">
<dt>It updates the weights using::</dt>
<dd>state = momentum * state + (1-momentum) * gradient
weight = weight - learning_rate * sign(state)</dd>
</dl>
<p>Where the parameter <code class="docutils literal"><span class="pre">momentum</span></code> is the decay rate of momentum estimates at each epoch.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li>sparse ndarray not supported for this optimizer yet.</li>
</ul>
</div>
<p>Defined in src/operator/optimizer_op.cc:L84</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>weight</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Weight</li>
<li><strong>grad</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Gradient</li>
<li><strong>mom</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Momentum</li>
<li><strong>lr</strong> (<em>float, required</em>) – Learning rate</li>
<li><strong>momentum</strong> (<em>float, optional, default=0</em>) – The decay rate of momentum estimates at each epoch.</li>
<li><strong>wd</strong> (<em>float, optional, default=0</em>) – Weight decay augments the objective function with a regularization term that penalizes large weights. The penalty scales with the square of the magnitude of each weight.</li>
<li><strong>rescale_grad</strong> (<em>float, optional, default=1</em>) – Rescale gradient to grad = rescale_grad*grad.</li>
<li><strong>clip_gradient</strong> (<em>float, optional, default=-1</em>) – Clip gradient to the range of [-clip_gradient, clip_gradient] If clip_gradient <= 0, gradient clipping is turned off. grad = max(min(grad, clip_gradient), -clip_gradient).</li>
<li><strong>wd_lh</strong> (<em>float, optional, default=0</em>) – The amount of weight decay that does not go into gradient/momentum calculationsotherwise do weight decay algorithmically only.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sin">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sin</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sin" title="Permalink to this definition"></a></dt>
<dd><p>Computes the element-wise sine of the input array.</p>
<p>The input should be in radians (<span class="math">\(2\pi\)</span> rad equals 360 degrees).</p>
<div class="math">
\[sin([0, \pi/4, \pi/2]) = [0, 0.707, 1]\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">sin</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>sin(default) = default</li>
<li>sin(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L46</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sinh">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sinh</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sinh" title="Permalink to this definition"></a></dt>
<dd><p>Returns the hyperbolic sine of the input array, computed element-wise.</p>
<div class="math">
\[sinh(x) = 0.5\times(exp(x) - exp(-x))\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">sinh</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>sinh(default) = default</li>
<li>sinh(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L201</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.slice">
<code class="descclassname">mxnet.symbol.</code><code class="descname">slice</code><span class="sig-paren">(</span><em>data=None</em>, <em>begin=_Null</em>, <em>end=_Null</em>, <em>step=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.slice" title="Permalink to this definition"></a></dt>
<dd><p>Slices a region of the array.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">crop</span></code> is deprecated. Use <code class="docutils literal"><span class="pre">slice</span></code> instead.</p>
</div>
<p>This function returns a sliced array between the indices given
by <cite>begin</cite> and <cite>end</cite> with the corresponding <cite>step</cite>.</p>
<p>For an input array of <code class="docutils literal"><span class="pre">shape=(d_0,</span> <span class="pre">d_1,</span> <span class="pre">...,</span> <span class="pre">d_n-1)</span></code>,
slice operation with <code class="docutils literal"><span class="pre">begin=(b_0,</span> <span class="pre">b_1...b_m-1)</span></code>,
<code class="docutils literal"><span class="pre">end=(e_0,</span> <span class="pre">e_1,</span> <span class="pre">...,</span> <span class="pre">e_m-1)</span></code>, and <code class="docutils literal"><span class="pre">step=(s_0,</span> <span class="pre">s_1,</span> <span class="pre">...,</span> <span class="pre">s_m-1)</span></code>,
where m <= n, results in an array with the shape
<code class="docutils literal"><span class="pre">(|e_0-b_0|/|s_0|,</span> <span class="pre">...,</span> <span class="pre">|e_m-1-b_m-1|/|s_m-1|,</span> <span class="pre">d_m,</span> <span class="pre">...,</span> <span class="pre">d_n-1)</span></code>.</p>
<p>The resulting array’s <em>k</em>-th dimension contains elements
from the <em>k</em>-th dimension of the input array starting
from index <code class="docutils literal"><span class="pre">b_k</span></code> (inclusive) with step <code class="docutils literal"><span class="pre">s_k</span></code>
until reaching <code class="docutils literal"><span class="pre">e_k</span></code> (exclusive).</p>
<p>If the <em>k</em>-th elements are <cite>None</cite> in the sequence of <cite>begin</cite>, <cite>end</cite>,
and <cite>step</cite>, the following rule will be used to set default values.
If <cite>s_k</cite> is <cite>None</cite>, set <cite>s_k=1</cite>. If <cite>s_k > 0</cite>, set <cite>b_k=0</cite>, <cite>e_k=d_k</cite>;
else, set <cite>b_k=d_k-1</cite>, <cite>e_k=-1</cite>.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">slice</span></code> output depends on storage types of inputs</p>
<ul class="simple">
<li>slice(csr) = csr</li>
<li>otherwise, <code class="docutils literal"><span class="pre">slice</span></code> generates output with default storage</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">When input data storage type is csr, it only supports</p>
</div>
<p>step=(), or step=(None,), or step=(1,) to generate a csr output.
For other step parameter values, it falls back to slicing
a dense tensor.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">9.</span><span class="p">,</span> <span class="mf">10.</span><span class="p">,</span> <span class="mf">11.</span><span class="p">,</span> <span class="mf">12.</span><span class="p">]]</span>
<span class="nb">slice</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">begin</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">),</span> <span class="n">end</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">4</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">]]</span>
<span class="nb">slice</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">begin</span><span class="o">=</span><span class="p">(</span><span class="bp">None</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">end</span><span class="o">=</span><span class="p">(</span><span class="bp">None</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">step</span><span class="o">=</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span><span class="mf">9.</span><span class="p">,</span> <span class="mf">11.</span><span class="p">],</span>
<span class="p">[</span><span class="mf">5.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">],</span>
<span class="p">[</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/matrix_op.cc:L411</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Source input</li>
<li><strong>begin</strong> (<em>Shape(tuple), required</em>) – starting indices for the slice operation, supports negative indices.</li>
<li><strong>end</strong> (<em>Shape(tuple), required</em>) – ending indices for the slice operation, supports negative indices.</li>
<li><strong>step</strong> (<em>Shape(tuple), optional, default=[]</em>) – step for the slice operation, supports negative values.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.slice_axis">
<code class="descclassname">mxnet.symbol.</code><code class="descname">slice_axis</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>begin=_Null</em>, <em>end=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.slice_axis" title="Permalink to this definition"></a></dt>
<dd><p>Slices along a given axis.</p>
<p>Returns an array slice along a given <cite>axis</cite> starting from the <cite>begin</cite> index
to the <cite>end</cite> index.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">9.</span><span class="p">,</span> <span class="mf">10.</span><span class="p">,</span> <span class="mf">11.</span><span class="p">,</span> <span class="mf">12.</span><span class="p">]]</span>
<span class="n">slice_axis</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">begin</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">end</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">9.</span><span class="p">,</span> <span class="mf">10.</span><span class="p">,</span> <span class="mf">11.</span><span class="p">,</span> <span class="mf">12.</span><span class="p">]]</span>
<span class="n">slice_axis</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">begin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">end</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">9.</span><span class="p">,</span> <span class="mf">10.</span><span class="p">]]</span>
<span class="n">slice_axis</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">begin</span><span class="o">=-</span><span class="mi">3</span><span class="p">,</span> <span class="n">end</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">6.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">10.</span><span class="p">,</span> <span class="mf">11.</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/matrix_op.cc:L498</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Source input</li>
<li><strong>axis</strong> (<em>int, required</em>) – Axis along which to be sliced, supports negative indexes.</li>
<li><strong>begin</strong> (<em>int, required</em>) – The beginning index along the axis to be sliced, supports negative indexes.</li>
<li><strong>end</strong> (<em>int or None, required</em>) – The ending index along the axis to be sliced, supports negative indexes.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.smooth_l1">
<code class="descclassname">mxnet.symbol.</code><code class="descname">smooth_l1</code><span class="sig-paren">(</span><em>data=None</em>, <em>scalar=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.smooth_l1" title="Permalink to this definition"></a></dt>
<dd><p>Calculate Smooth L1 Loss(lhs, scalar) by summing</p>
<div class="math">
\[\begin{split}f(x) =
\begin{cases}
(\sigma x)^2/2,&amp; \text{if }x < 1/\sigma^2\\
|x|-0.5/\sigma^2,&amp; \text{otherwise}
\end{cases}\end{split}\]</div>
<p>where <span class="math">\(x\)</span> is an element of the tensor <em>lhs</em> and <span class="math">\(\sigma\)</span> is the scalar.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">smooth_l1</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">],</span> <span class="n">sigma</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">1.5</span><span class="p">,</span> <span class="mf">2.5</span><span class="p">,</span> <span class="mf">3.5</span><span class="p">]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_binary_scalar_op_extended.cc:L103</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – source input</li>
<li><strong>scalar</strong> (<em>float</em>) – scalar input</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.softmax">
<code class="descclassname">mxnet.symbol.</code><code class="descname">softmax</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.softmax" title="Permalink to this definition"></a></dt>
<dd><p>Applies the softmax function.</p>
<p>The resulting array contains elements in the range (0,1) and the elements along the given axis sum up to 1.</p>
<div class="math">
\[softmax(\mathbf{z})_j = \frac{e^{z_j}}{\sum_{k=1}^K e^{z_k}}\]</div>
<p>for <span class="math">\(j = 1, ..., K\)</span></p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[ 1. 1. 1.]
[ 1. 1. 1.]]
softmax(x,axis=0) = [[ 0.5 0.5 0.5]
[ 0.5 0.5 0.5]]
softmax(x,axis=1) = [[ 0.33333334, 0.33333334, 0.33333334],
[ 0.33333334, 0.33333334, 0.33333334]]
</pre></div>
</div>
<p>Defined in src/operator/nn/softmax.cc:L97</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>axis</strong> (<em>int, optional, default='-1'</em>) – The axis along which to compute softmax.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.softmax_cross_entropy">
<code class="descclassname">mxnet.symbol.</code><code class="descname">softmax_cross_entropy</code><span class="sig-paren">(</span><em>data=None</em>, <em>label=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.softmax_cross_entropy" title="Permalink to this definition"></a></dt>
<dd><p>Calculate cross entropy of softmax output and one-hot label.</p>
<ul>
<li><p class="first">This operator computes the cross entropy in two steps:
- Applies softmax function on the input array.
- Computes and returns the cross entropy loss between the softmax output and the labels.</p>
</li>
<li><p class="first">The softmax function and cross entropy loss is given by:</p>
<ul class="simple">
<li>Softmax Function:</li>
</ul>
<div class="math">
\[\text{softmax}(x)_i = \frac{exp(x_i)}{\sum_j exp(x_j)}\]</div>
<ul class="simple">
<li>Cross Entropy Function:</li>
</ul>
<div class="math">
\[\text{CE(label, output)} = - \sum_i \text{label}_i \log(\text{output}_i)\]</div>
</li>
</ul>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">],</span>
<span class="p">[</span><span class="mi">11</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">5</span><span class="p">]]</span>
<span class="n">label</span> <span class="o">=</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">]</span>
<span class="n">softmax</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span><span class="mf">0.09003057</span><span class="p">,</span> <span class="mf">0.24472848</span><span class="p">,</span> <span class="mf">0.66524094</span><span class="p">],</span>
<span class="p">[</span><span class="mf">0.97962922</span><span class="p">,</span> <span class="mf">0.01794253</span><span class="p">,</span> <span class="mf">0.00242826</span><span class="p">]]</span>
<span class="n">softmax_cross_entropy</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">label</span><span class="p">)</span> <span class="o">=</span> <span class="o">-</span> <span class="n">log</span><span class="p">(</span><span class="mf">0.66524084</span><span class="p">)</span> <span class="o">-</span> <span class="n">log</span><span class="p">(</span><span class="mf">0.97962922</span><span class="p">)</span> <span class="o">=</span> <span class="mf">0.4281871</span>
</pre></div>
</div>
<p>Defined in src/operator/loss_binary_op.cc:L59</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data</li>
<li><strong>label</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input label</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.softsign">
<code class="descclassname">mxnet.symbol.</code><code class="descname">softsign</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.softsign" title="Permalink to this definition"></a></dt>
<dd><p>Computes softsign of x element-wise.</p>
<div class="math">
\[y = x / (1 + abs(x))\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">softsign</span></code> output is always dense</p>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L119</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sort">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sort</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>is_ascend=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sort" title="Permalink to this definition"></a></dt>
<dd><p>Returns a sorted copy of an input array along the given axis.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[ 1, 4],
[ 3, 1]]
// sorts along the last axis
sort(x) = [[ 1., 4.],
[ 1., 3.]]
// flattens and then sorts
sort(x) = [ 1., 1., 3., 4.]
// sorts along the first axis
sort(x, axis=0) = [[ 1., 1.],
[ 3., 4.]]
// in a descend order
sort(x, is_ascend=0) = [[ 4., 1.],
[ 3., 1.]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/ordering_op.cc:L126</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array</li>
<li><strong>axis</strong> (<em>int or None, optional, default='-1'</em>) – Axis along which to choose sort the input tensor. If not given, the flattened array is used. Default is -1.</li>
<li><strong>is_ascend</strong> (<em>boolean, optional, default=1</em>) – Whether to sort in ascending or descending order.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.split">
<code class="descclassname">mxnet.symbol.</code><code class="descname">split</code><span class="sig-paren">(</span><em>data=None</em>, <em>num_outputs=_Null</em>, <em>axis=_Null</em>, <em>squeeze_axis=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.split" title="Permalink to this definition"></a></dt>
<dd><p>Splits an array along a particular axis into multiple sub-arrays.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">SliceChannel</span></code> is deprecated. Use <code class="docutils literal"><span class="pre">split</span></code> instead.</p>
</div>
<p><strong>Note</strong> that <cite>num_outputs</cite> should evenly divide the length of the axis
along which to split the array.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[[ 1.]
[ 2.]]
[[ 3.]
[ 4.]]
[[ 5.]
[ 6.]]]
x.shape = (3, 2, 1)
y = split(x, axis=1, num_outputs=2) // a list of 2 arrays with shape (3, 1, 1)
y = [[[ 1.]]
[[ 3.]]
[[ 5.]]]
[[[ 2.]]
[[ 4.]]
[[ 6.]]]
y[0].shape = (3, 1, 1)
z = split(x, axis=0, num_outputs=3) // a list of 3 arrays with shape (1, 2, 1)
z = [[[ 1.]
[ 2.]]]
[[[ 3.]
[ 4.]]]
[[[ 5.]
[ 6.]]]
z[0].shape = (1, 2, 1)
</pre></div>
</div>
<p><cite>squeeze_axis=1</cite> removes the axis with length 1 from the shapes of the output arrays.
<strong>Note</strong> that setting <cite>squeeze_axis</cite> to <code class="docutils literal"><span class="pre">1</span></code> removes axis with length 1 only
along the <cite>axis</cite> which it is split.
Also <cite>squeeze_axis</cite> can be set to true only if <code class="docutils literal"><span class="pre">input.shape[axis]</span> <span class="pre">==</span> <span class="pre">num_outputs</span></code>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>z = split(x, axis=0, num_outputs=3, squeeze_axis=1) // a list of 3 arrays with shape (2, 1)
z = [[ 1.]
[ 2.]]
[[ 3.]
[ 4.]]
[[ 5.]
[ 6.]]
z[0].shape = (2 ,1 )
</pre></div>
</div>
<p>Defined in src/operator/slice_channel.cc:L107</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>num_outputs</strong> (<em>int, required</em>) – Number of splits. Note that this should evenly divide the length of the <cite>axis</cite>.</li>
<li><strong>axis</strong> (<em>int, optional, default='1'</em>) – Axis along which to split.</li>
<li><strong>squeeze_axis</strong> (<em>boolean, optional, default=0</em>) – If true, Removes the axis with length 1 from the shapes of the output arrays. <strong>Note</strong> that setting <cite>squeeze_axis</cite> to <code class="docutils literal"><span class="pre">true</span></code> removes axis with length 1 only along the <cite>axis</cite> which it is split. Also <cite>squeeze_axis</cite> can be set to <code class="docutils literal"><span class="pre">true</span></code> only if <code class="docutils literal"><span class="pre">input.shape[axis]</span> <span class="pre">==</span> <span class="pre">num_outputs</span></code>.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sqrt">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sqrt</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sqrt" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise square-root value of the input.</p>
<div class="math">
\[\textrm{sqrt}(x) = \sqrt{x}\]</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">sqrt</span><span class="p">([</span><span class="mi">4</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">16</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">sqrt</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>sqrt(default) = default</li>
<li>sqrt(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L639</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.square">
<code class="descclassname">mxnet.symbol.</code><code class="descname">square</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.square" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise squared value of the input.</p>
<div class="math">
\[square(x) = x^2\]</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">square</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="mi">4</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">16</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">square</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>square(default) = default</li>
<li>square(row_sparse) = row_sparse</li>
<li>square(csr) = csr</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L616</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.squeeze">
<code class="descclassname">mxnet.symbol.</code><code class="descname">squeeze</code><span class="sig-paren">(</span><em>*data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.squeeze" title="Permalink to this definition"></a></dt>
<dd><p>Remove single-dimensional entries from the shape of an array.
Same behavior of defining the output tensor shape as numpy.squeeze for the most of cases.
See the following note for exception.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">data</span> <span class="o">=</span> <span class="p">[[[</span><span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="mi">2</span><span class="p">]]]</span>
<span class="n">squeeze</span><span class="p">(</span><span class="n">data</span><span class="p">)</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span>
<span class="n">squeeze</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="mi">2</span><span class="p">]]</span>
<span class="n">squeeze</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">]]</span>
<span class="n">squeeze</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The output of this operator will keep at least one dimension not removed. For example,
squeeze([[[4]]]) = [4], while in numpy.squeeze, the output will become a scalar.</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<em>Symbol[]</em>) – data to squeeze</li>
<li><strong>axis</strong> (<em>int, optional, default='0'</em>) – The axis in the result array along which the input arrays are stacked.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.stack">
<code class="descclassname">mxnet.symbol.</code><code class="descname">stack</code><span class="sig-paren">(</span><em>*data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.stack" title="Permalink to this definition"></a></dt>
<dd><p>Join a sequence of arrays along a new axis.</p>
<p>The axis parameter specifies the index of the new axis in the dimensions of the
result. For example, if axis=0 it will be the first dimension and if axis=-1 it
will be the last dimension.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]</span>
<span class="n">stack</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
<span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]]</span>
<span class="n">stack</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">],</span>
<span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">]]</span>
</pre></div>
</div>
<p>This function support variable length of positional input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<em>Symbol[]</em>) – List of arrays to stack</li>
<li><strong>axis</strong> (<em>int, optional, default='0'</em>) – The axis in the result array along which the input arrays are stacked.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.stop_gradient">
<code class="descclassname">mxnet.symbol.</code><code class="descname">stop_gradient</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.stop_gradient" title="Permalink to this definition"></a></dt>
<dd><p>Stops gradient computation.</p>
<p>Stops the accumulated gradient of the inputs from flowing through this operator
in the backward direction. In other words, this operator prevents the contribution
of its inputs to be taken into account for computing gradients.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>v1 = [1, 2]
v2 = [0, 1]
a = Variable('a')
b = Variable('b')
b_stop_grad = stop_gradient(3 * b)
loss = MakeLoss(b_stop_grad + a)
executor = loss.simple_bind(ctx=cpu(), a=(1,2), b=(1,2))
executor.forward(is_train=True, a=v1, b=v2)
executor.outputs
[ 1. 5.]
executor.backward()
executor.grad_arrays
[ 0. 0.]
[ 1. 1.]
</pre></div>
</div>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L241</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sum">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sum</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>exclude=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sum" title="Permalink to this definition"></a></dt>
<dd><p>Computes the sum of array elements over given axes.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>sum</cite> and <cite>sum_axis</cite> are equivalent.
For ndarray of csr storage type summation along axis 0 and axis 1 is supported.
Setting keepdims or exclude to True will cause a fallback to dense operator.</p>
</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>data = [[[1,2],[2,3],[1,3]],
[[1,4],[4,3],[5,2]],
[[7,1],[7,2],[7,3]]]
sum(data, axis=1)
[[ 4. 8.]
[ 10. 9.]
[ 21. 6.]]
sum(data, axis=[1,2])
[ 12. 19. 27.]
data = [[1,2,0],
[3,0,1],
[4,1,0]]
csr = cast_storage(data, 'csr')
sum(csr, axis=0)
[ 8. 3. 1.]
sum(csr, axis=1)
[ 3. 4. 5.]
</pre></div>
</div>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L85</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – <p>The axis or axes along which to perform the reduction.</p>
<p>The default, <cite>axis=()</cite>, will compute over all elements into a
scalar array with shape <cite>(1,)</cite>.</p>
<p>If <cite>axis</cite> is int, a reduction is performed on a particular axis.</p>
<p>If <cite>axis</cite> is a tuple of ints, a reduction is performed on all the axes
specified in the tuple.</p>
<p>If <cite>exclude</cite> is true, reduction will be performed on the axes that are
NOT in axis instead.</p>
<p>Negative values means indexing from right to left.</p>
</li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axes are left in the result as dimension with size one.</li>
<li><strong>exclude</strong> (<em>boolean, optional, default=0</em>) – Whether to perform reduction on axis that are NOT in axis instead.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.sum_axis">
<code class="descclassname">mxnet.symbol.</code><code class="descname">sum_axis</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>keepdims=_Null</em>, <em>exclude=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.sum_axis" title="Permalink to this definition"></a></dt>
<dd><p>Computes the sum of array elements over given axes.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>sum</cite> and <cite>sum_axis</cite> are equivalent.
For ndarray of csr storage type summation along axis 0 and axis 1 is supported.
Setting keepdims or exclude to True will cause a fallback to dense operator.</p>
</div>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>data = [[[1,2],[2,3],[1,3]],
[[1,4],[4,3],[5,2]],
[[7,1],[7,2],[7,3]]]
sum(data, axis=1)
[[ 4. 8.]
[ 10. 9.]
[ 21. 6.]]
sum(data, axis=[1,2])
[ 12. 19. 27.]
data = [[1,2,0],
[3,0,1],
[4,1,0]]
csr = cast_storage(data, 'csr')
sum(csr, axis=0)
[ 8. 3. 1.]
sum(csr, axis=1)
[ 3. 4. 5.]
</pre></div>
</div>
<p>Defined in src/operator/tensor/broadcast_reduce_op_value.cc:L85</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>axis</strong> (<em>Shape(tuple), optional, default=[]</em>) – <p>The axis or axes along which to perform the reduction.</p>
<p>The default, <cite>axis=()</cite>, will compute over all elements into a
scalar array with shape <cite>(1,)</cite>.</p>
<p>If <cite>axis</cite> is int, a reduction is performed on a particular axis.</p>
<p>If <cite>axis</cite> is a tuple of ints, a reduction is performed on all the axes
specified in the tuple.</p>
<p>If <cite>exclude</cite> is true, reduction will be performed on the axes that are
NOT in axis instead.</p>
<p>Negative values means indexing from right to left.</p>
</li>
<li><strong>keepdims</strong> (<em>boolean, optional, default=0</em>) – If this is set to <cite>True</cite>, the reduced axes are left in the result as dimension with size one.</li>
<li><strong>exclude</strong> (<em>boolean, optional, default=0</em>) – Whether to perform reduction on axis that are NOT in axis instead.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.swapaxes">
<code class="descclassname">mxnet.symbol.</code><code class="descname">swapaxes</code><span class="sig-paren">(</span><em>data=None</em>, <em>dim1=_Null</em>, <em>dim2=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.swapaxes" title="Permalink to this definition"></a></dt>
<dd><p>Interchanges two axes of an array.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span> x = [[1, 2, 3]])
swapaxes(x, 0, 1) = [[ 1],
[ 2],
[ 3]]
x = [[[ 0, 1],
[ 2, 3]],
[[ 4, 5],
[ 6, 7]]] // (2,2,2) array
swapaxes(x, 0, 2) = [[[ 0, 4],
[ 2, 6]],
[[ 1, 5],
[ 3, 7]]]
</pre></div>
</div>
<p>Defined in src/operator/swapaxis.cc:L70</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input array.</li>
<li><strong>dim1</strong> (<em>int (non-negative), optional, default=0</em>) – the first axis to be swapped.</li>
<li><strong>dim2</strong> (<em>int (non-negative), optional, default=0</em>) – the second axis to be swapped.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.take">
<code class="descclassname">mxnet.symbol.</code><code class="descname">take</code><span class="sig-paren">(</span><em>a=None</em>, <em>indices=None</em>, <em>axis=_Null</em>, <em>mode=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.take" title="Permalink to this definition"></a></dt>
<dd><p>Takes elements from an input array along the given axis.</p>
<p>This function slices the input array along a particular axis with the provided indices.</p>
<p>Given an input array with shape <code class="docutils literal"><span class="pre">(d0,</span> <span class="pre">d1,</span> <span class="pre">d2)</span></code> and indices with shape <code class="docutils literal"><span class="pre">(i0,</span> <span class="pre">i1)</span></code>, the output
will have shape <code class="docutils literal"><span class="pre">(i0,</span> <span class="pre">i1,</span> <span class="pre">d1,</span> <span class="pre">d2)</span></code>, computed by:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">output</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">,:,:]</span> <span class="o">=</span> <span class="nb">input</span><span class="p">[</span><span class="n">indices</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">],:,:]</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li><cite>axis</cite>- Only slicing along axis 0 is supported for now.</li>
<li><cite>mode</cite>- Only <cite>clip</cite> mode is supported for now.</li>
</ul>
</div>
<dl class="docutils">
<dt>Examples::</dt>
<dd><p class="first">x = [4. 5. 6.]</p>
<p>// Trivial case, take the second element along the first axis.
take(x, [1]) = [ 5. ]</p>
<dl class="docutils">
<dt>x = [[ 1., 2.],</dt>
<dd>[ 3., 4.],
[ 5., 6.]]</dd>
</dl>
<p>// In this case we will get rows 0 and 1, then 1 and 2. Along axis 0
take(x, [[0,1],[1,2]]) = [[[ 1., 2.],</p>
<blockquote class="last">
<div><blockquote>
<div>[ 3., 4.]],</div></blockquote>
<dl class="docutils">
<dt>[[ 3., 4.],</dt>
<dd>[ 5., 6.]]]</dd>
</dl>
</div></blockquote>
</dd>
</dl>
<p>Defined in src/operator/tensor/indexing_op.cc:L371</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>a</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>indices</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The indices of the values to be extracted.</li>
<li><strong>axis</strong> (<em>int, optional, default='0'</em>) – The axis of input array to be taken.</li>
<li><strong>mode</strong> (<em>{'clip', 'raise', 'wrap'},optional, default='clip'</em>) – Specify how out-of-bound indices bahave. “clip” means clip to the range. So, if all indices mentioned are too large, they are replaced by the index that addresses the last element along an axis. “wrap” means to wrap around. “raise” means to raise an error.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.tan">
<code class="descclassname">mxnet.symbol.</code><code class="descname">tan</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.tan" title="Permalink to this definition"></a></dt>
<dd><p>Computes the element-wise tangent of the input array.</p>
<p>The input should be in radians (<span class="math">\(2\pi\)</span> rad equals 360 degrees).</p>
<div class="math">
\[tan([0, \pi/4, \pi/2]) = [0, 1, -inf]\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">tan</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>tan(default) = default</li>
<li>tan(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L83</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.tanh">
<code class="descclassname">mxnet.symbol.</code><code class="descname">tanh</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.tanh" title="Permalink to this definition"></a></dt>
<dd><p>Returns the hyperbolic tangent of the input array, computed element-wise.</p>
<div class="math">
\[tanh(x) = sinh(x) / cosh(x)\]</div>
<p>The storage type of <code class="docutils literal"><span class="pre">tanh</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>tanh(default) = default</li>
<li>tanh(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L234</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.tile">
<code class="descclassname">mxnet.symbol.</code><code class="descname">tile</code><span class="sig-paren">(</span><em>data=None</em>, <em>reps=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.tile" title="Permalink to this definition"></a></dt>
<dd><p>Repeats the whole array multiple times.</p>
<p>If <code class="docutils literal"><span class="pre">reps</span></code> has length <em>d</em>, and input array has dimension of <em>n</em>. There are
three cases:</p>
<ul>
<li><p class="first"><strong>n=d</strong>. Repeat <em>i</em>-th dimension of the input by <code class="docutils literal"><span class="pre">reps[i]</span></code> times:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
<span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]]</span>
<span class="n">tile</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">reps</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]</span>
</pre></div>
</div>
</li>
<li><p class="first"><strong>n>d</strong>. <code class="docutils literal"><span class="pre">reps</span></code> is promoted to length <em>n</em> by pre-pending 1’s to it. Thus for
an input shape <code class="docutils literal"><span class="pre">(2,3)</span></code>, <code class="docutils literal"><span class="pre">repos=(2,)</span></code> is treated as <code class="docutils literal"><span class="pre">(1,2)</span></code>:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">tile</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">reps</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]</span>
</pre></div>
</div>
</li>
<li><p class="first"><strong>n<d</strong>. The input is promoted to be d-dimensional by prepending new axes. So a
shape <code class="docutils literal"><span class="pre">(2,2)</span></code> array is promoted to <code class="docutils literal"><span class="pre">(1,2,2)</span></code> for 3-D replication:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">tile</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">reps</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]],</span>
<span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]]</span>
</pre></div>
</div>
</li>
</ul>
<p>Defined in src/operator/tensor/matrix_op.cc:L676</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Input data array</li>
<li><strong>reps</strong> (<em>Shape(tuple), required</em>) – The number of times for repeating the tensor a. If reps has length d, the result will have dimension of max(d, a.ndim); If a.ndim < d, a is promoted to be d-dimensional by prepending new axes. If a.ndim > d, reps is promoted to a.ndim by pre-pending 1’s to it.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.topk">
<code class="descclassname">mxnet.symbol.</code><code class="descname">topk</code><span class="sig-paren">(</span><em>data=None</em>, <em>axis=_Null</em>, <em>k=_Null</em>, <em>ret_typ=_Null</em>, <em>is_ascend=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.topk" title="Permalink to this definition"></a></dt>
<dd><p>Returns the top <em>k</em> elements in an input array along the given axis.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>x = [[ 0.3, 0.2, 0.4],
[ 0.1, 0.3, 0.2]]
// returns an index of the largest element on last axis
topk(x) = [[ 2.],
[ 1.]]
// returns the value of top-2 largest elements on last axis
topk(x, ret_typ='value', k=2) = [[ 0.4, 0.3],
[ 0.3, 0.2]]
// returns the value of top-2 smallest elements on last axis
topk(x, ret_typ='value', k=2, is_ascend=1) = [[ 0.2 , 0.3],
[ 0.1 , 0.2]]
// returns the value of top-2 largest elements on axis 0
topk(x, axis=0, ret_typ='value', k=2) = [[ 0.3, 0.3, 0.4],
[ 0.1, 0.2, 0.2]]
// flattens and then returns list of both values and indices
topk(x, ret_typ='both', k=2) = [[[ 0.4, 0.3], [ 0.3, 0.2]] , [[ 2., 0.], [ 1., 2.]]]
</pre></div>
</div>
<p>Defined in src/operator/tensor/ordering_op.cc:L63</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array</li>
<li><strong>axis</strong> (<em>int or None, optional, default='-1'</em>) – Axis along which to choose the top k indices. If not given, the flattened array is used. Default is -1.</li>
<li><strong>k</strong> (<em>int, optional, default='1'</em>) – Number of top elements to select, should be always smaller than or equal to the element number in the given axis. A global sort is performed if set k < 1.</li>
<li><strong>ret_typ</strong> (<em>{'both', 'indices', 'mask', 'value'},optional, default='indices'</em>) – The return type.
“value” means to return the top k values, “indices” means to return the indices of the top k values, “mask” means to return a mask array containing 0 and 1. 1 means the top k values. “both” means to return a list of both values and indices of top k elements.</li>
<li><strong>is_ascend</strong> (<em>boolean, optional, default=0</em>) – Whether to choose k largest or k smallest elements. Top K largest elements will be chosen if set to false.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.transpose">
<code class="descclassname">mxnet.symbol.</code><code class="descname">transpose</code><span class="sig-paren">(</span><em>data=None</em>, <em>axes=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.transpose" title="Permalink to this definition"></a></dt>
<dd><p>Permutes the dimensions of an array.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
<span class="p">[</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]]</span>
<span class="n">transpose</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">3.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]]</span>
<span class="n">x</span> <span class="o">=</span> <span class="p">[[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">]],</span>
<span class="p">[[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">]]]</span>
<span class="n">transpose</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">5.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">7.</span><span class="p">]],</span>
<span class="p">[[</span> <span class="mf">2.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">4.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">]]]</span>
<span class="n">transpose</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">axes</span><span class="o">=</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">5.</span><span class="p">,</span> <span class="mf">6.</span><span class="p">]],</span>
<span class="p">[[</span> <span class="mf">3.</span><span class="p">,</span> <span class="mf">4.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">7.</span><span class="p">,</span> <span class="mf">8.</span><span class="p">]]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/matrix_op.cc:L309</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – Source input</li>
<li><strong>axes</strong> (<em>Shape(tuple), optional, default=[]</em>) – Target axis order. By default the axes will be inverted.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.trunc">
<code class="descclassname">mxnet.symbol.</code><code class="descname">trunc</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.trunc" title="Permalink to this definition"></a></dt>
<dd><p>Return the element-wise truncated value of the input.</p>
<p>The truncated value of the scalar x is the nearest integer i which is closer to
zero than x is. In short, the fractional part of the signed number x is discarded.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">trunc</span><span class="p">([</span><span class="o">-</span><span class="mf">2.1</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.9</span><span class="p">,</span> <span class="mf">1.5</span><span class="p">,</span> <span class="mf">1.9</span><span class="p">,</span> <span class="mf">2.1</span><span class="p">])</span> <span class="o">=</span> <span class="p">[</span><span class="o">-</span><span class="mf">2.</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">2.</span><span class="p">]</span>
</pre></div>
</div>
<p>The storage type of <code class="docutils literal"><span class="pre">trunc</span></code> output depends upon the input storage type:</p>
<blockquote>
<div><ul class="simple">
<li>trunc(default) = default</li>
<li>trunc(row_sparse) = row_sparse</li>
</ul>
</div></blockquote>
<p>Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L577</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input array.</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.uniform">
<code class="descclassname">mxnet.symbol.</code><code class="descname">uniform</code><span class="sig-paren">(</span><em>low=_Null</em>, <em>high=_Null</em>, <em>shape=_Null</em>, <em>ctx=_Null</em>, <em>dtype=_Null</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.uniform" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a uniform distribution.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The existing alias <code class="docutils literal"><span class="pre">uniform</span></code> is deprecated.</p>
</div>
<p>Samples are uniformly distributed over the half-open interval <em>[low, high)</em>
(includes <em>low</em>, but excludes <em>high</em>).</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">uniform</span><span class="p">(</span><span class="n">low</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">high</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.60276335</span><span class="p">,</span> <span class="mf">0.85794562</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.54488319</span><span class="p">,</span> <span class="mf">0.84725171</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/random/sample_op.cc:L66</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>low</strong> (<em>float, optional, default=0</em>) – Lower bound of the distribution.</li>
<li><strong>high</strong> (<em>float, optional, default=1</em>) – Upper bound of the distribution.</li>
<li><strong>shape</strong> (<em>Shape(tuple), optional, default=[]</em>) – Shape of the output.</li>
<li><strong>ctx</strong> (<em>string, optional, default=''</em>) – Context of output, in format [cpu|gpu|cpu_pinned](n). Only used for imperative calls.</li>
<li><strong>dtype</strong> (<em>{'None', 'float16', 'float32', 'float64'},optional, default='None'</em>) – DType of the output in case this can’t be inferred. Defaults to float32 if not defined (dtype=None).</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.where">
<code class="descclassname">mxnet.symbol.</code><code class="descname">where</code><span class="sig-paren">(</span><em>condition=None</em>, <em>x=None</em>, <em>y=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.where" title="Permalink to this definition"></a></dt>
<dd><p>Return the elements, either from x or y, depending on the condition.</p>
<p>Given three ndarrays, condition, x, and y, return an ndarray with the elements from x or y,
depending on the elements from condition are true or false. x and y must have the same shape.
If condition has the same shape as x, each element in the output array is from x if the
corresponding element in the condition is true, and from y if false.</p>
<p>If condition does not have the same shape as x, it must be a 1D array whose size is
the same as x’s first dimension size. Each row of the output array is from x’s row
if the corresponding element from condition is true, and from y’s row if false.</p>
<p>Note that all non-zero values are interpreted as <code class="docutils literal"><span class="pre">True</span></code> in condition.</p>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]]</span>
<span class="n">y</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">],</span> <span class="p">[</span><span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">]]</span>
<span class="n">cond</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">]]</span>
<span class="n">where</span><span class="p">(</span><span class="n">cond</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">5</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">8</span><span class="p">]]</span>
<span class="n">csr_cond</span> <span class="o">=</span> <span class="n">cast_storage</span><span class="p">(</span><span class="n">cond</span><span class="p">,</span> <span class="s1">'csr'</span><span class="p">)</span>
<span class="n">where</span><span class="p">(</span><span class="n">csr_cond</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">5</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">8</span><span class="p">]]</span>
</pre></div>
</div>
<p>Defined in src/operator/tensor/control_flow_op.cc:L57</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>condition</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – condition array</li>
<li><strong>x</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – </li>
<li><strong>y</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – </li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.zeros_like">
<code class="descclassname">mxnet.symbol.</code><code class="descname">zeros_like</code><span class="sig-paren">(</span><em>data=None</em>, <em>name=None</em>, <em>attr=None</em>, <em>out=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.zeros_like" title="Permalink to this definition"></a></dt>
<dd><p>Return an array of zeros with the same shape and type
as the input array.</p>
<p>The storage type of <code class="docutils literal"><span class="pre">zeros_like</span></code> output depends on the storage type of the input</p>
<ul class="simple">
<li>zeros_like(row_sparse) = row_sparse</li>
<li>zeros_like(csr) = csr</li>
<li>zeros_like(default) = default</li>
</ul>
<p>Examples:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">]]</span>
<span class="n">zeros_like</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">],</span>
<span class="p">[</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">]]</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – The input</li>
<li><strong>name</strong> (<em>string, optional.</em>) – Name of the resulting symbol.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The result symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.var">
<code class="descclassname">mxnet.symbol.</code><code class="descname">var</code><span class="sig-paren">(</span><em>name</em>, <em>attr=None</em>, <em>shape=None</em>, <em>lr_mult=None</em>, <em>wd_mult=None</em>, <em>dtype=None</em>, <em>init=None</em>, <em>stype=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#var"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.var" title="Permalink to this definition"></a></dt>
<dd><p>Creates a symbolic variable with specified name.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">,</span> <span class="n">attr</span><span class="o">=</span><span class="p">{</span><span class="s1">'a'</span><span class="p">:</span> <span class="s1">'b'</span><span class="p">})</span>
<span class="gp">>>> </span><span class="n">data</span>
<span class="go"><Symbol data></span>
<span class="gp">>>> </span><span class="n">csr_data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'csr_data'</span><span class="p">,</span> <span class="n">stype</span><span class="o">=</span><span class="s1">'csr'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">csr_data</span>
<span class="go"><Symbol csr_data></span>
<span class="gp">>>> </span><span class="n">row_sparse_weight</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'weight'</span><span class="p">,</span> <span class="n">stype</span><span class="o">=</span><span class="s1">'row_sparse'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">row_sparse_weight</span>
<span class="go"><Symbol weight></span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> (<em>str</em>) – Variable name.</li>
<li><strong>attr</strong> (<em>Dict of strings</em>) – Additional attributes to set on the variable. Format {string : string}.</li>
<li><strong>shape</strong> (<em>tuple</em>) – The shape of a variable. If specified, this will be used during the shape inference.
If one has specified a different shape for this variable using
a keyword argument when calling shape inference, this shape information will be ignored.</li>
<li><strong>lr_mult</strong> (<em>float</em>) – The learning rate multiplier for input variable.</li>
<li><strong>wd_mult</strong> (<em>float</em>) – Weight decay multiplier for input variable.</li>
<li><strong>dtype</strong> (<em>str or numpy.dtype</em>) – The dtype for input variable. If not specified, this value will be inferred.</li>
<li><strong>init</strong> (<em>initializer (mxnet.init.*)</em>) – Initializer for this variable to (optionally) override the default initializer.</li>
<li><strong>stype</strong> (<em>str</em>) – The storage type of the variable, such as ‘row_sparse’, ‘csr’, ‘default’, etc</li>
<li><strong>kwargs</strong> (<em>Additional attribute variables</em>) – Additional attributes must start and end with double underscores.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>variable</strong>
A symbol corresponding to an input to the computation graph.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Variable">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Variable</code><span class="sig-paren">(</span><em>name</em>, <em>attr=None</em>, <em>shape=None</em>, <em>lr_mult=None</em>, <em>wd_mult=None</em>, <em>dtype=None</em>, <em>init=None</em>, <em>stype=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#mxnet.symbol.Variable" title="Permalink to this definition"></a></dt>
<dd><p>Creates a symbolic variable with specified name.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'data'</span><span class="p">,</span> <span class="n">attr</span><span class="o">=</span><span class="p">{</span><span class="s1">'a'</span><span class="p">:</span> <span class="s1">'b'</span><span class="p">})</span>
<span class="gp">>>> </span><span class="n">data</span>
<span class="go"><Symbol data></span>
<span class="gp">>>> </span><span class="n">csr_data</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'csr_data'</span><span class="p">,</span> <span class="n">stype</span><span class="o">=</span><span class="s1">'csr'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">csr_data</span>
<span class="go"><Symbol csr_data></span>
<span class="gp">>>> </span><span class="n">row_sparse_weight</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'weight'</span><span class="p">,</span> <span class="n">stype</span><span class="o">=</span><span class="s1">'row_sparse'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">row_sparse_weight</span>
<span class="go"><Symbol weight></span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> (<em>str</em>) – Variable name.</li>
<li><strong>attr</strong> (<em>Dict of strings</em>) – Additional attributes to set on the variable. Format {string : string}.</li>
<li><strong>shape</strong> (<em>tuple</em>) – The shape of a variable. If specified, this will be used during the shape inference.
If one has specified a different shape for this variable using
a keyword argument when calling shape inference, this shape information will be ignored.</li>
<li><strong>lr_mult</strong> (<em>float</em>) – The learning rate multiplier for input variable.</li>
<li><strong>wd_mult</strong> (<em>float</em>) – Weight decay multiplier for input variable.</li>
<li><strong>dtype</strong> (<em>str or numpy.dtype</em>) – The dtype for input variable. If not specified, this value will be inferred.</li>
<li><strong>init</strong> (<em>initializer (mxnet.init.*)</em>) – Initializer for this variable to (optionally) override the default initializer.</li>
<li><strong>stype</strong> (<em>str</em>) – The storage type of the variable, such as ‘row_sparse’, ‘csr’, ‘default’, etc</li>
<li><strong>kwargs</strong> (<em>Additional attribute variables</em>) – Additional attributes must start and end with double underscores.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>variable</strong>
A symbol corresponding to an input to the computation graph.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.Group">
<code class="descclassname">mxnet.symbol.</code><code class="descname">Group</code><span class="sig-paren">(</span><em>symbols</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#Group"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.Group" title="Permalink to this definition"></a></dt>
<dd><p>Creates a symbol that contains a collection of other symbols, grouped together.</p>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'a'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'b'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Group</span><span class="p">([</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="p">])</span>
<span class="go"><Symbol Grouped></span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>symbols</strong> (<em>list</em>) – List of symbols to be grouped.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>sym</strong>
A group symbol.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.load">
<code class="descclassname">mxnet.symbol.</code><code class="descname">load</code><span class="sig-paren">(</span><em>fname</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#load"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.load" title="Permalink to this definition"></a></dt>
<dd><p>Loads symbol from a JSON file.</p>
<p>You can also use pickle to do the job if you only work on python.
The advantage of load/save is the file is language agnostic.
This means the file saved using save can be loaded by other language binding of mxnet.
You also get the benefit being able to directly load/save from cloud storage(S3, HDFS).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fname</strong> (<em>str</em>) – <p>The name of the file, examples:</p>
<ul class="simple">
<li><cite>s3://my-bucket/path/my-s3-symbol</cite></li>
<li><cite>hdfs://my-bucket/path/my-hdfs-symbol</cite></li>
<li><cite>/path-to/my-local-symbol</cite></li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>sym</strong>
The loaded symbol.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#mxnet.symbol.Symbol.save" title="mxnet.symbol.Symbol.save"><code class="xref py py-func docutils literal"><span class="pre">Symbol.save()</span></code></a></dt>
<dd>Used to save symbol into file.</dd>
</dl>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.load_json">
<code class="descclassname">mxnet.symbol.</code><code class="descname">load_json</code><span class="sig-paren">(</span><em>json_str</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#load_json"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.load_json" title="Permalink to this definition"></a></dt>
<dd><p>Loads symbol from json string.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>json_str</strong> (<em>str</em>) – A JSON string.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>sym</strong>
The loaded symbol.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#mxnet.symbol.Symbol.tojson" title="mxnet.symbol.Symbol.tojson"><code class="xref py py-func docutils literal"><span class="pre">Symbol.tojson()</span></code></a></dt>
<dd>Used to save symbol into json string.</dd>
</dl>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.pow">
<code class="descclassname">mxnet.symbol.</code><code class="descname">pow</code><span class="sig-paren">(</span><em>base</em>, <em>exp</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#pow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.pow" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise result of base element raised to powers from exp element.</p>
<p>Both inputs can be Symbol or scalar number.
Broadcasting is not supported. Use <cite>broadcast_pow</cite> instead.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>base</strong> (<em>Symbol or scalar</em>) – The base symbol</li>
<li><strong>exp</strong> (<em>Symbol or scalar</em>) – The exponent symbol</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The bases in x raised to the exponents in y.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">Symbol or scalar</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">pow</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
<span class="go">8</span>
<span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'x'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'y'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">pow</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">]))[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([ 1., 4.], dtype=float32)</span>
<span class="gp">>>> </span><span class="n">z</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">pow</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">y</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]))[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([ 9., 27.], dtype=float32)</span>
<span class="gp">>>> </span><span class="n">z</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">pow</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]),</span> <span class="n">y</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]))[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([ 9., 64.], dtype=float32)</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.maximum">
<code class="descclassname">mxnet.symbol.</code><code class="descname">maximum</code><span class="sig-paren">(</span><em>left</em>, <em>right</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#maximum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.maximum" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise maximum of the input elements.</p>
<p>Both inputs can be Symbol or scalar number. Broadcasting is not supported.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>left</strong> (<em>Symbol or scalar</em>) – First symbol to be compared.</li>
<li><strong>right</strong> (<em>Symbol or scalar</em>) – Second symbol to be compared.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The element-wise maximum of the input symbols.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">Symbol or scalar</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">maximum</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mf">3.5</span><span class="p">)</span>
<span class="go">3.5</span>
<span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'x'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'y'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">maximum</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">3</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">10</span><span class="p">]))[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([ 4., 5., 4., 10.], dtype=float32)</span>
<span class="gp">>>> </span><span class="n">z</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">maximum</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]),</span> <span class="n">y</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">10</span><span class="p">,</span><span class="mi">2</span><span class="p">]))[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([ 10., 4.], dtype=float32)</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.minimum">
<code class="descclassname">mxnet.symbol.</code><code class="descname">minimum</code><span class="sig-paren">(</span><em>left</em>, <em>right</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#minimum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.minimum" title="Permalink to this definition"></a></dt>
<dd><p>Returns element-wise minimum of the input elements.</p>
<p>Both inputs can be Symbol or scalar number. Broadcasting is not supported.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>left</strong> (<em>Symbol or scalar</em>) – First symbol to be compared.</li>
<li><strong>right</strong> (<em>Symbol or scalar</em>) – Second symbol to be compared.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The element-wise minimum of the input symbols.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">Symbol or scalar</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">minimum</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mf">3.5</span><span class="p">)</span>
<span class="go">2</span>
<span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'x'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'y'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">minimum</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">3</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">10</span><span class="p">]))[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([ 3., 4., 2., 4.], dtype=float32)</span>
<span class="gp">>>> </span><span class="n">z</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">minimum</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]),</span> <span class="n">y</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">10</span><span class="p">,</span><span class="mi">2</span><span class="p">]))[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([ 3., 2.], dtype=float32)</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.hypot">
<code class="descclassname">mxnet.symbol.</code><code class="descname">hypot</code><span class="sig-paren">(</span><em>left</em>, <em>right</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#hypot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.hypot" title="Permalink to this definition"></a></dt>
<dd><p>Given the “legs” of a right triangle, returns its hypotenuse.</p>
<p>Equivalent to <span class="math">\(\sqrt(left^2 + right^2)\)</span>, element-wise.
Both inputs can be Symbol or scalar number. Broadcasting is not supported.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>left</strong> (<em>Symbol or scalar</em>) – First leg of the triangle(s).</li>
<li><strong>right</strong> (<em>Symbol or scalar</em>) – Second leg of the triangle(s).</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The hypotenuse of the triangle(s)</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">Symbol or scalar</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">hypot</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
<span class="go">5.0</span>
<span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'x'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="s1">'y'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">hypot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">3</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">2</span><span class="p">]))[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([ 5., 6.40312433, 4.47213602], dtype=float32)</span>
<span class="gp">>>> </span><span class="n">z</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">sym</span><span class="o">.</span><span class="n">hypot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">z</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]),</span> <span class="n">y</span><span class="o">=</span><span class="n">mx</span><span class="o">.</span><span class="n">nd</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">10</span><span class="p">,</span><span class="mi">2</span><span class="p">]))[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">()</span>
<span class="go">array([ 10.44030666, 4.47213602], dtype=float32)</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.zeros">
<code class="descclassname">mxnet.symbol.</code><code class="descname">zeros</code><span class="sig-paren">(</span><em>shape</em>, <em>dtype=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#zeros"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.zeros" title="Permalink to this definition"></a></dt>
<dd><p>Returns a new symbol of given shape and type, filled with zeros.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>shape</strong> (<em>int or sequence of ints</em>) – Shape of the new array.</li>
<li><strong>dtype</strong> (<em>str or numpy.dtype, optional</em>) – The value type of the inner value, default to <code class="docutils literal"><span class="pre">np.float32</span></code>.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>out</strong>
The created Symbol.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.ones">
<code class="descclassname">mxnet.symbol.</code><code class="descname">ones</code><span class="sig-paren">(</span><em>shape</em>, <em>dtype=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#ones"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.ones" title="Permalink to this definition"></a></dt>
<dd><p>Returns a new symbol of given shape and type, filled with ones.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>shape</strong> (<em>int or sequence of ints</em>) – Shape of the new array.</li>
<li><strong>dtype</strong> (<em>str or numpy.dtype, optional</em>) – The value type of the inner value, default to <code class="docutils literal"><span class="pre">np.float32</span></code>.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>out</strong>
The created Symbol</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.full">
<code class="descclassname">mxnet.symbol.</code><code class="descname">full</code><span class="sig-paren">(</span><em>shape</em>, <em>val</em>, <em>dtype=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#full"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.full" title="Permalink to this definition"></a></dt>
<dd><p>Returns a new array of given shape and type, filled with the given value <cite>val</cite>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>shape</strong> (<em>int or sequence of ints</em>) – Shape of the new array.</li>
<li><strong>val</strong> (<em>scalar</em>) – Fill value.</li>
<li><strong>dtype</strong> (<em>str or numpy.dtype, optional</em>) – The value type of the inner value, default to <code class="docutils literal"><span class="pre">np.float32</span></code>.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>out</strong>
The created Symbol</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.arange">
<code class="descclassname">mxnet.symbol.</code><code class="descname">arange</code><span class="sig-paren">(</span><em>start</em>, <em>stop=None</em>, <em>step=1.0</em>, <em>repeat=1</em>, <em>name=None</em>, <em>dtype=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/symbol.html#arange"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.arange" title="Permalink to this definition"></a></dt>
<dd><p>Returns evenly spaced values within a given interval.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>start</strong> (<em>number</em>) – Start of interval. The interval includes this value. The default start value is 0.</li>
<li><strong>stop</strong> (<em>number, optional</em>) – End of interval. The interval does not include this value.</li>
<li><strong>step</strong> (<em>number, optional</em>) – Spacing between values.</li>
<li><strong>repeat</strong> (<em>int, optional</em>) – “The repeating time of all elements.
E.g repeat=3, the element a will be repeated three times –> a, a, a.</li>
<li><strong>dtype</strong> (<em>str or numpy.dtype, optional</em>) – The value type of the inner value, default to <code class="docutils literal"><span class="pre">np.float32</span></code>.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>out</strong>
The created Symbol</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol">Symbol</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<span class="target" id="module-mxnet.symbol.random"></span><p>Random distribution generator Symbol API of MXNet.</p>
<dl class="function">
<dt id="mxnet.symbol.random.uniform">
<code class="descclassname">mxnet.symbol.random.</code><code class="descname">uniform</code><span class="sig-paren">(</span><em>low=0</em>, <em>high=1</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/random.html#uniform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.random.uniform" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a uniform distribution.</p>
<p>Samples are uniformly distributed over the half-open interval <em>[low, high)</em>
(includes <em>low</em>, but excludes <em>high</em>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>low</strong> (<em>float or Symbol</em>) – Lower boundary of the output interval. All values generated will be
greater than or equal to low. The default value is 0.</li>
<li><strong>high</strong> (<em>float or Symbol</em>) – Upper boundary of the output interval. All values generated will be
less than high. The default value is 1.0.</li>
<li><strong>shape</strong> (<em>int or tuple of ints</em>) – The number of samples to draw. If shape is, e.g., <cite>(m, n)</cite> and <cite>low</cite> and
<cite>high</cite> are scalars, output shape will be <cite>(m, n)</cite>. If <cite>low</cite> and <cite>high</cite>
are Symbols with shape, e.g., <cite>(x, y)</cite>, then output will have shape
<cite>(x, y, m, n)</cite>, where <cite>m*n</cite> samples are drawn for each <cite>[low, high)</cite> pair.</li>
<li><strong>dtype</strong> (<em>{'float16','float32', 'float64'}</em>) – Data type of output samples. Default is ‘float32’</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random.normal">
<code class="descclassname">mxnet.symbol.random.</code><code class="descname">normal</code><span class="sig-paren">(</span><em>loc=0</em>, <em>scale=1</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/random.html#normal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.random.normal" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a normal (Gaussian) distribution.</p>
<p>Samples are distributed according to a normal distribution parametrized
by <em>loc</em> (mean) and <em>scale</em> (standard deviation).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>loc</strong> (<em>float or Symbol</em>) – Mean (centre) of the distribution.</li>
<li><strong>scale</strong> (<em>float or Symbol</em>) – Standard deviation (spread or width) of the distribution.</li>
<li><strong>shape</strong> (<em>int or tuple of ints</em>) – The number of samples to draw. If shape is, e.g., <cite>(m, n)</cite> and <cite>loc</cite> and
<cite>scale</cite> are scalars, output shape will be <cite>(m, n)</cite>. If <cite>loc</cite> and <cite>scale</cite>
are Symbols with shape, e.g., <cite>(x, y)</cite>, then output will have shape
<cite>(x, y, m, n)</cite>, where <cite>m*n</cite> samples are drawn for each <cite>[loc, scale)</cite> pair.</li>
<li><strong>dtype</strong> (<em>{'float16','float32', 'float64'}</em>) – Data type of output samples. Default is ‘float32’</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random.poisson">
<code class="descclassname">mxnet.symbol.random.</code><code class="descname">poisson</code><span class="sig-paren">(</span><em>lam=1</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/random.html#poisson"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.random.poisson" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a Poisson distribution.</p>
<p>Samples are distributed according to a Poisson distribution parametrized
by <em>lambda</em> (rate). Samples will always be returned as a floating point data type.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>lam</strong> (<em>float or Symbol</em>) – Expectation of interval, should be >= 0.</li>
<li><strong>shape</strong> (<em>int or tuple of ints</em>) – The number of samples to draw. If shape is, e.g., <cite>(m, n)</cite> and <cite>lam</cite> is
a scalar, output shape will be <cite>(m, n)</cite>. If <cite>lam</cite>
is an Symbol with shape, e.g., <cite>(x, y)</cite>, then output will have shape
<cite>(x, y, m, n)</cite>, where <cite>m*n</cite> samples are drawn for each entry in <cite>lam</cite>.</li>
<li><strong>dtype</strong> (<em>{'float16','float32', 'float64'}</em>) – Data type of output samples. Default is ‘float32’</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random.exponential">
<code class="descclassname">mxnet.symbol.random.</code><code class="descname">exponential</code><span class="sig-paren">(</span><em>scale=1</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/random.html#exponential"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.random.exponential" title="Permalink to this definition"></a></dt>
<dd><p>Draw samples from an exponential distribution.</p>
<p>Its probability density function is</p>
<blockquote>
<div>f(x; frac{1}{beta}) = frac{1}{beta} exp(-frac{x}{beta}),</div></blockquote>
<p>for x > 0 and 0 elsewhere. beta is the scale parameter, which is the
inverse of the rate parameter lambda = 1/beta.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>scale</strong> (<em>float or Symbol</em>) – The scale parameter, beta = 1/lambda.</li>
<li><strong>shape</strong> (<em>int or tuple of ints</em>) – The number of samples to draw. If shape is, e.g., <cite>(m, n)</cite> and <cite>scale</cite> is
a scalar, output shape will be <cite>(m, n)</cite>. If <cite>scale</cite>
is an Symbol with shape, e.g., <cite>(x, y)</cite>, then output will have shape
<cite>(x, y, m, n)</cite>, where <cite>m*n</cite> samples are drawn for each entry in <cite>scale</cite>.</li>
<li><strong>dtype</strong> (<em>{'float16','float32', 'float64'}</em>) – Data type of output samples. Default is ‘float32’</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random.gamma">
<code class="descclassname">mxnet.symbol.random.</code><code class="descname">gamma</code><span class="sig-paren">(</span><em>alpha=1</em>, <em>beta=1</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/random.html#gamma"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.random.gamma" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a gamma distribution.</p>
<p>Samples are distributed according to a gamma distribution parametrized
by <em>alpha</em> (shape) and <em>beta</em> (scale).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>alpha</strong> (<em>float or Symbol</em>) – The shape of the gamma distribution. Should be greater than zero.</li>
<li><strong>beta</strong> (<em>float or Symbol</em>) – The scale of the gamma distribution. Should be greater than zero.
Default is equal to 1.</li>
<li><strong>shape</strong> (<em>int or tuple of ints</em>) – The number of samples to draw. If shape is, e.g., <cite>(m, n)</cite> and <cite>alpha</cite> and
<cite>beta</cite> are scalars, output shape will be <cite>(m, n)</cite>. If <cite>alpha</cite> and <cite>beta</cite>
are Symbols with shape, e.g., <cite>(x, y)</cite>, then output will have shape
<cite>(x, y, m, n)</cite>, where <cite>m*n</cite> samples are drawn for each <cite>[alpha, beta)</cite> pair.</li>
<li><strong>dtype</strong> (<em>{'float16','float32', 'float64'}</em>) – Data type of output samples. Default is ‘float32’</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random.negative_binomial">
<code class="descclassname">mxnet.symbol.random.</code><code class="descname">negative_binomial</code><span class="sig-paren">(</span><em>k=1</em>, <em>p=1</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/random.html#negative_binomial"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.random.negative_binomial" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a negative binomial distribution.</p>
<p>Samples are distributed according to a negative binomial distribution
parametrized by <em>k</em> (limit of unsuccessful experiments) and <em>p</em> (failure
probability in each experiment). Samples will always be returned as a
floating point data type.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>k</strong> (<em>float or Symbol</em>) – Limit of unsuccessful experiments, > 0.</li>
<li><strong>p</strong> (<em>float or Symbol</em>) – Failure probability in each experiment, >= 0 and <=1.</li>
<li><strong>shape</strong> (<em>int or tuple of ints</em>) – The number of samples to draw. If shape is, e.g., <cite>(m, n)</cite> and <cite>k</cite> and
<cite>p</cite> are scalars, output shape will be <cite>(m, n)</cite>. If <cite>k</cite> and <cite>p</cite>
are Symbols with shape, e.g., <cite>(x, y)</cite>, then output will have shape
<cite>(x, y, m, n)</cite>, where <cite>m*n</cite> samples are drawn for each <cite>[k, p)</cite> pair.</li>
<li><strong>dtype</strong> (<em>{'float16','float32', 'float64'}</em>) – Data type of output samples. Default is ‘float32’</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random.generalized_negative_binomial">
<code class="descclassname">mxnet.symbol.random.</code><code class="descname">generalized_negative_binomial</code><span class="sig-paren">(</span><em>mu=1</em>, <em>alpha=1</em>, <em>shape=_Null</em>, <em>dtype=_Null</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/random.html#generalized_negative_binomial"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.random.generalized_negative_binomial" title="Permalink to this definition"></a></dt>
<dd><p>Draw random samples from a generalized negative binomial distribution.</p>
<p>Samples are distributed according to a generalized negative binomial
distribution parametrized by <em>mu</em> (mean) and <em>alpha</em> (dispersion).
<em>alpha</em> is defined as <em>1/k</em> where <em>k</em> is the failure limit of the
number of unsuccessful experiments (generalized to real numbers).
Samples will always be returned as a floating point data type.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>mu</strong> (<em>float or Symbol</em>) – Mean of the negative binomial distribution.</li>
<li><strong>alpha</strong> (<em>float or Symbol</em>) – Alpha (dispersion) parameter of the negative binomial distribution.</li>
<li><strong>shape</strong> (<em>int or tuple of ints</em>) – The number of samples to draw. If shape is, e.g., <cite>(m, n)</cite> and <cite>mu</cite> and
<cite>alpha</cite> are scalars, output shape will be <cite>(m, n)</cite>. If <cite>mu</cite> and <cite>alpha</cite>
are Symbols with shape, e.g., <cite>(x, y)</cite>, then output will have shape
<cite>(x, y, m, n)</cite>, where <cite>m*n</cite> samples are drawn for each <cite>[mu, alpha)</cite> pair.</li>
<li><strong>dtype</strong> (<em>{'float16','float32', 'float64'}</em>) – Data type of output samples. Default is ‘float32’</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="mxnet.symbol.random.multinomial">
<code class="descclassname">mxnet.symbol.random.</code><code class="descname">multinomial</code><span class="sig-paren">(</span><em>data</em>, <em>shape=_Null</em>, <em>get_prob=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/mxnet/symbol/random.html#multinomial"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mxnet.symbol.random.multinomial" title="Permalink to this definition"></a></dt>
<dd><p>Concurrent sampling from multiple multinomial distributions.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The input distribution must be normalized, i.e. <cite>data</cite> must sum to
1 along its last dimension.</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name"/>
<col class="field-body"/>
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>data</strong> (<a class="reference internal" href="#mxnet.symbol.Symbol" title="mxnet.symbol.Symbol"><em>Symbol</em></a>) – An <em>n</em> dimensional array whose last dimension has length <cite>k</cite>, where
<cite>k</cite> is the number of possible outcomes of each multinomial distribution.
For example, data with shape <cite>(m, n, k)</cite> specifies <cite>m*n</cite> multinomial
distributions each with <cite>k</cite> possible outcomes.</li>
<li><strong>shape</strong> (<em>int or tuple of ints</em>) – The number of samples to draw from each distribution. If shape is empty
one sample will be drawn from each distribution.</li>
<li><strong>get_prob</strong> (<em>bool</em>) – If true, a second array containing log likelihood of the drawn
samples will also be returned.
This is usually used for reinforcement learning, where you can provide
reward as head gradient w.r.t. this array to estimate gradient.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<script>auto_index("api-reference");</script></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="#">Symbol API</a><ul>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#the-symbol-class">The <code class="docutils literal"><span class="pre">Symbol</span></code> class</a><ul>
<li><a class="reference internal" href="#composition">Composition</a><ul>
<li><a class="reference internal" href="#arithmetic-operations">Arithmetic operations</a></li>
<li><a class="reference internal" href="#trigonometric-functions">Trigonometric functions</a></li>
<li><a class="reference internal" href="#hyperbolic-functions">Hyperbolic functions</a></li>
<li><a class="reference internal" href="#exponents-and-logarithms">Exponents and logarithms</a></li>
<li><a class="reference internal" href="#powers">Powers</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#basic-neural-network-functions">Basic neural network functions</a><ul>
<li><a class="reference internal" href="#comparison-operators">Comparison operators</a></li>
<li><a class="reference internal" href="#symbol-creation">Symbol creation</a></li>
<li><a class="reference internal" href="#changing-shape-and-type">Changing shape and type</a></li>
<li><a class="reference internal" href="#expanding-elements">Expanding elements</a></li>
<li><a class="reference internal" href="#rearranging-elements">Rearranging elements</a></li>
<li><a class="reference internal" href="#reduce-functions">Reduce functions</a></li>
<li><a class="reference internal" href="#rounding">Rounding</a></li>
<li><a class="reference internal" href="#sorting-and-searching">Sorting and searching</a></li>
<li><a class="reference internal" href="#query-information">Query information</a></li>
<li><a class="reference internal" href="#indexing">Indexing</a></li>
<li><a class="reference internal" href="#get-internal-and-output-symbol">Get internal and output symbol</a></li>
<li><a class="reference internal" href="#inference-type-and-shape">Inference type and shape</a></li>
<li><a class="reference internal" href="#bind">Bind</a></li>
<li><a class="reference internal" href="#save">Save</a></li>
<li><a class="reference internal" href="#miscellaneous">Miscellaneous</a></li>
</ul>
</li>
<li><a class="reference internal" href="#symbol-creation-routines">Symbol creation routines</a></li>
<li><a class="reference internal" href="#symbol-manipulation-routines">Symbol manipulation routines</a><ul>
<li><a class="reference internal" href="#changing-shape-and-type">Changing shape and type</a></li>
<li><a class="reference internal" href="#expanding-elements">Expanding elements</a></li>
<li><a class="reference internal" href="#rearranging-elements">Rearranging elements</a></li>
<li><a class="reference internal" href="#joining-and-splitting-symbols">Joining and splitting symbols</a></li>
<li><a class="reference internal" href="#indexing-routines">Indexing routines</a></li>
</ul>
</li>
<li><a class="reference internal" href="#mathematical-functions">Mathematical functions</a><ul>
<li><a class="reference internal" href="#arithmetic-operations">Arithmetic operations</a></li>
<li><a class="reference internal" href="#trigonometric-functions">Trigonometric functions</a></li>
<li><a class="reference internal" href="#hyperbolic-functions">Hyperbolic functions</a></li>
<li><a class="reference internal" href="#reduce-functions">Reduce functions</a></li>
<li><a class="reference internal" href="#rounding">Rounding</a></li>
<li><a class="reference internal" href="#exponents-and-logarithms">Exponents and logarithms</a></li>
<li><a class="reference internal" href="#powers">Powers</a></li>
<li><a class="reference internal" href="#comparison">Comparison</a></li>
<li><a class="reference internal" href="#random-sampling">Random sampling</a></li>
<li><a class="reference internal" href="#sorting-and-searching">Sorting and searching</a></li>
<li><a class="reference internal" href="#sequence-operation">Sequence operation</a></li>
<li><a class="reference internal" href="#miscellaneous">Miscellaneous</a></li>
</ul>
</li>
<li><a class="reference internal" href="#neural-network">Neural network</a><ul>
<li><a class="reference internal" href="#basic">Basic</a></li>
<li><a class="reference internal" href="#more">More</a></li>
</ul>
</li>
<li><a class="reference internal" href="#api-reference">API Reference</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>