Unverified Commit 93b7b517 authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Doc through relu, use mathtt instead of texttt in equations. (#936)

* Doc through relu, use mathtt instead of texttt in equations.

* Review comments.
parent 0c3bc7d0
......@@ -48,7 +48,7 @@ Backprop
.. math::
\overline{\texttt{arg}} \leftarrow \Delta\ \mathrm{sgn}(\texttt{arg})
\overline{\mathtt{arg}} \leftarrow \Delta\ \mathrm{sgn}(\mathtt{arg})
C++ Interface
......
......@@ -40,14 +40,14 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \cos^{-1}(\texttt{arg}_{i_0, \ldots, i_{n-1}})
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \cos^{-1}(\mathtt{arg}_{i_0, \ldots, i_{n-1}})
Backprop
========
.. math::
\overline{\texttt{arg}} \leftarrow -\frac{\Delta}{\sqrt{1-\texttt{arg}^2}}
\overline{\mathtt{arg}} \leftarrow -\frac{\Delta}{\sqrt{1-\mathtt{arg}^2}}
C++ Interface
......
......@@ -44,15 +44,15 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \texttt{arg0}_{i_0, \ldots, i_{n-1}} + \texttt{arg1}_{i_0, \ldots, i_{n-1}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}} + \mathtt{arg1}_{i_0, \ldots, i_{n-1}}
Backprop
========
.. math::
\overline{\texttt{arg0}} &\leftarrow \Delta \\
\overline{\texttt{arg1}} &\leftarrow \Delta
\overline{\mathtt{arg0}} &\leftarrow \Delta \\
\overline{\mathtt{arg1}} &\leftarrow \Delta
C++ Interface
......
......@@ -44,7 +44,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \texttt{arg0}_{i_0, \ldots, i_{n-1}}\, \texttt{&&}\, \texttt{arg1}_{i_0, \ldots, i_{n-1}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}}\, \mathtt{&&}\, \mathtt{arg1}_{i_0, \ldots, i_{n-1}}
C++ Interface
......
......@@ -40,14 +40,14 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \sin^{-1}(\texttt{arg}_{i_0, \ldots, i_{n-1}})
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \sin^{-1}(\mathtt{arg}_{i_0, \ldots, i_{n-1}})
Backprop
========
.. math::
\overline{\texttt{arg}} \leftarrow \frac{\Delta}{\sqrt{1-\texttt{arg}^2}}
\overline{\mathtt{arg}} \leftarrow \frac{\Delta}{\sqrt{1-\mathtt{arg}^2}}
C++ Interface
=============
......
......@@ -40,7 +40,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \tan^{-1}(\texttt{arg}_{i_0, \ldots, i_{n-1}})
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \tan^{-1}(\mathtt{arg}_{i_0, \ldots, i_{n-1}})
Backprop
......@@ -48,7 +48,7 @@ Backprop
.. math::
\overline{\texttt{arg}} \leftarrow \frac{\Delta}{1+\texttt{arg}^2}
\overline{\mathtt{arg}} \leftarrow \frac{\Delta}{1+\mathtt{arg}^2}
C++ Interface
......
......@@ -53,12 +53,12 @@ For example, if ``arg`` is :math:`[a, b, c]` then
.. math::
\texttt{Broadcast(arg, Shape{2, 3}, AxisSet{0})} &=
\mathtt{Broadcast(arg, Shape{2, 3}, AxisSet{0})} &=
\begin{bmatrix}
a & b & c\\
a & b & c
\end{bmatrix}\\
\texttt{Broadcast(arg, Shape{3, 2}, AxisSet{1})} &=
\mathtt{Broadcast(arg, Shape{3, 2}, AxisSet{1})} &=
\begin{bmatrix}
a & a\\
b & b\\
......@@ -71,12 +71,12 @@ Mathematical Definition
For a coordinate :math:`C`, let :math:`p(C)` be a coordinate with the
axes in ``broadcast_axes`` removed. For example, if
:math:`\texttt{broadcast_axes}=\{1,3\}` then :math:`p([d_0, d_1,
:math:`\mathtt{broadcast_axes}=\{1,3\}` then :math:`p([d_0, d_1,
d_2, d_3, d_4]) = [d_0, d_2, d_4]`. Then
.. math::
\texttt{output}_C = \texttt{arg}_{p(C)}.
\mathtt{output}_C = \mathtt{arg}_{p(C)}.
......@@ -85,7 +85,7 @@ Backprop
.. math::
\overline{\texttt{arg}} \leftarrow \texttt{Sum}(\Delta, \texttt{broadcast_axes}).
\overline{\mathtt{arg}} \leftarrow \mathtt{Sum}(\Delta, \mathtt{broadcast_axes}).
C++ Interface
......
......@@ -56,13 +56,13 @@ Let
.. math::
s(i) &= \sum_{j<i} \texttt{args}[i].\texttt{shape}\left[\texttt{concatenation_axis}\right]\\
s(i) &= \sum_{j<i} \mathtt{args}[i].\mathtt{shape}\left[\mathtt{concatenation_axis}\right]\\
t(i) &= \text{The greatest }j\text{ such that }i \ge s(j)\\
p(C)_i &= \begin{cases}
C_i-s(t(i))&\text{if }i==\texttt{concatenation_axis}\\
C_i-s(t(i))&\text{if }i==\mathtt{concatenation_axis}\\
C_i&\text{otherwise}
\end{cases}\\
\texttt{output}_C&=\texttt{args}[t(C_i)]_{p(C)}
\mathtt{output}_C&=\mathtt{args}[t(C_i)]_{p(C)}
......
......@@ -49,7 +49,7 @@ Backprop
.. math::
\overline{\texttt{arg}} \leftarrow \texttt{Convert}(\Delta,\texttt{arg->get_element_type()})
\overline{\mathtt{arg}} \leftarrow \mathtt{Convert}(\Delta,\mathtt{arg->get_element_type()})
C++ Interface
......
......@@ -40,7 +40,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \cos(\texttt{arg}_{i_0, \ldots, i_{n-1}})
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \cos(\mathtt{arg}_{i_0, \ldots, i_{n-1}})
Backprop
......@@ -48,7 +48,7 @@ Backprop
.. math::
\overline{\texttt{arg}} \leftarrow -\Delta\ \sin(\texttt{arg})
\overline{\mathtt{arg}} \leftarrow -\Delta\ \sin(\mathtt{arg})
C++ Interface
......
......@@ -40,7 +40,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \cosh(\texttt{arg}_{i_0, \ldots, i_{n-1}})
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \cosh(\mathtt{arg}_{i_0, \ldots, i_{n-1}})
Backprop
......@@ -48,7 +48,7 @@ Backprop
.. math::
\overline{\texttt{arg}} \leftarrow \Delta\ \sinh(\texttt{arg})
\overline{\mathtt{arg}} \leftarrow \Delta\ \sinh(\mathtt{arg})
C++ Interface
......
......@@ -42,15 +42,15 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \frac{\texttt{arg0}_{i_0, \ldots, i_{n-1}}}{\texttt{arg1}_{i_0, \ldots, i_{n-1}}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \frac{\mathtt{arg0}_{i_0, \ldots, i_{n-1}}}{\mathtt{arg1}_{i_0, \ldots, i_{n-1}}}
Backprop
========
.. math::
\overline{\texttt{arg0}} &\leftarrow \frac{\Delta}{\texttt{arg1}}\\
\overline{\texttt{arg1}} &\leftarrow -\Delta \frac{\texttt{Output}}{\texttt{arg1}}
\overline{\mathtt{arg0}} &\leftarrow \frac{\Delta}{\mathtt{arg1}}\\
\overline{\mathtt{arg1}} &\leftarrow -\Delta \frac{\mathtt{Output}}{\mathtt{arg1}}
C++ Interface
......
......@@ -61,14 +61,14 @@ Mathematical Definition
.. math::
\texttt{output}_{i_1,\dots,i_n,k_1,\ldots,k_p} =
\mathtt{output}_{i_1,\dots,i_n,k_1,\ldots,k_p} =
\begin{cases}
\texttt{arg0}_{i_1,\dots,i_n} \cdot
\texttt{arg1}_{k_1,\dots,k_p}&\text{if }m=0,\\
\mathtt{arg0}_{i_1,\dots,i_n} \cdot
\mathtt{arg1}_{k_1,\dots,k_p}&\text{if }m=0,\\
\sum_{j_1, \ldots, j_m}
\texttt{arg0}_{i_1,\dots,i_n,j_1,\dots,j_m}
\mathtt{arg0}_{i_1,\dots,i_n,j_1,\dots,j_m}
\cdot
\texttt{arg1}_{j_1,\ldots,j_m,k_1,\ldots,k_p}
\mathtt{arg1}_{j_1,\ldots,j_m,k_1,\ldots,k_p}
&\text{otherwise}.
\end{cases}
......
......@@ -43,7 +43,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \texttt{arg0}_{i_0, \ldots, i_{n-1}} == \texttt{arg1}_{i_0, \ldots, i_{n-1}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}} == \mathtt{arg1}_{i_0, \ldots, i_{n-1}}
C++ Interface
......
......@@ -40,7 +40,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \exp(\texttt{arg}_{i_0, \ldots, i_{n-1}})
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \exp(\mathtt{arg}_{i_0, \ldots, i_{n-1}})
Backprop
......@@ -48,7 +48,7 @@ Backprop
.. math::
\overline{\texttt{arg}} \leftarrow \Delta\ \texttt{output}
\overline{\mathtt{arg}} \leftarrow \Delta\ \mathtt{output}
C++ Interface
......
......@@ -42,7 +42,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \texttt{arg0}_{i_0, \ldots, i_{n-1}} > \texttt{arg1}_{i_0, \ldots, i_{n-1}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}} > \mathtt{arg1}_{i_0, \ldots, i_{n-1}}
C++ Interface
......
......@@ -42,7 +42,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \texttt{arg0}_{i_0, \ldots, i_{n-1}} \ge \texttt{arg1}_{i_0, \ldots, i_{n-1}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}} \ge \mathtt{arg1}_{i_0, \ldots, i_{n-1}}
C++ Interface
......
......@@ -91,6 +91,10 @@ Not currently a comprehensive list.
one_hot.rst
or.rst
pad.rst
parameter.rst
power.rst
product.rst
relu.rst
softmax.rst
......@@ -42,7 +42,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \texttt{arg0}_{i_0, \ldots, i_{n-1}} < \texttt{arg1}_{i_0, \ldots, i_{n-1}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}} < \mathtt{arg1}_{i_0, \ldots, i_{n-1}}
C++ Interface
......
......@@ -42,7 +42,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \texttt{arg0}_{i_0, \ldots, i_{n-1}} \le \texttt{arg1}_{i_0, \ldots, i_{n-1}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}} \le \mathtt{arg1}_{i_0, \ldots, i_{n-1}}
C++ Interface
......
......@@ -41,7 +41,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \log(\texttt{arg}_{i_0, \ldots, i_{n-1}})
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \log(\mathtt{arg}_{i_0, \ldots, i_{n-1}})
Backprop
......@@ -49,7 +49,7 @@ Backprop
.. math::
\overline{\texttt{arg}} \leftarrow \frac{\Delta}{\texttt{input}}
\overline{\mathtt{arg}} \leftarrow \frac{\Delta}{\mathtt{input}}
C++ Interface
......
......@@ -37,7 +37,7 @@ Outputs
+-----------------+-------------------------+------------------------------------------------+
| Name | Element Type | Shape |
+=================+=========================+================================================+
| ``output`` | Same as ``arg`` | :math:`(d_i:i\not\in \texttt{reduction_axes})` |
| ``output`` | Same as ``arg`` | :math:`(d_i:i\not\in \mathtt{reduction_axes})` |
+-----------------+-------------------------+------------------------------------------------+
......
......@@ -42,15 +42,15 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \max(\texttt{arg0}_{i_0, \ldots, i_{n-1}}, \texttt{arg1}_{i_0, \ldots, i_{n-1}})
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \max(\mathtt{arg0}_{i_0, \ldots, i_{n-1}}, \mathtt{arg1}_{i_0, \ldots, i_{n-1}})
Backprop
========
.. math::
\overline{\texttt{arg0}} &\leftarrow \texttt{Greater}(\texttt{arg0}, \texttt{arg1})\ \Delta \\
\overline{\texttt{arg1}} &\leftarrow \texttt{Greater}(\texttt{arg1}, \texttt{arg0})\ \Delta
\overline{\mathtt{arg0}} &\leftarrow \mathtt{Greater}(\mathtt{arg0}, \mathtt{arg1})\ \Delta \\
\overline{\mathtt{arg1}} &\leftarrow \mathtt{Greater}(\mathtt{arg1}, \mathtt{arg0})\ \Delta
C++ Interface
......
......@@ -37,7 +37,7 @@ Outputs
+-----------------+-------------------------+------------------------------------------------+
| Name | Element Type | Shape |
+=================+=========================+================================================+
| ``output`` | Same as ``arg`` | :math:`(d_i:i\not\in \texttt{reduction_axes})` |
| ``output`` | Same as ``arg`` | :math:`(d_i:i\not\in \mathtt{reduction_axes})` |
+-----------------+-------------------------+------------------------------------------------+
......
......@@ -42,15 +42,15 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \min(\texttt{arg0}_{i_0, \ldots, i_{n-1}}, \texttt{arg1}_{i_0, \ldots, i_{n-1}})
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \min(\mathtt{arg0}_{i_0, \ldots, i_{n-1}}, \mathtt{arg1}_{i_0, \ldots, i_{n-1}})
Backprop
========
.. math::
\overline{\texttt{arg0}} &\leftarrow \texttt{Less}(\texttt{arg0}, \texttt{arg1})\ \Delta \\
\overline{\texttt{arg1}} &\leftarrow \texttt{Less}(\texttt{arg1}, \texttt{arg0})\ \Delta
\overline{\mathtt{arg0}} &\leftarrow \mathtt{Less}(\mathtt{arg0}, \mathtt{arg1})\ \Delta \\
\overline{\mathtt{arg1}} &\leftarrow \mathtt{Less}(\mathtt{arg1}, \mathtt{arg0})\ \Delta
C++ Interface
......
......@@ -42,15 +42,15 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \texttt{arg0}_{i_0, \ldots, i_{n-1}} \texttt{arg1}_{i_0, \ldots, i_{n-1}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}} \mathtt{arg1}_{i_0, \ldots, i_{n-1}}
Backprop
========
.. math::
\overline{\texttt{arg0}} &\leftarrow \Delta\ \texttt{arg1}\\
\overline{\texttt{arg1}} &\leftarrow \Delta\ \texttt{arg0}
\overline{\mathtt{arg0}} &\leftarrow \Delta\ \mathtt{arg1}\\
\overline{\mathtt{arg1}} &\leftarrow \Delta\ \mathtt{arg0}
C++ Interface
......
......@@ -48,7 +48,7 @@ Backprop
.. math::
\overline{\texttt{arg}} \leftarrow -\Delta
\overline{\mathtt{arg}} \leftarrow -\Delta
C++ Interface
......
......@@ -43,7 +43,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \texttt{arg0}_{i_0, \ldots, i_{n-1}} \neq \texttt{arg1}_{i_0, \ldots, i_{n-1}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}} \neq \mathtt{arg1}_{i_0, \ldots, i_{n-1}}
C++ Interface
......
......@@ -44,7 +44,7 @@ Mathematical Definition
.. math::
\texttt{output}_{i_0, \ldots, i_{n-1}} = \texttt{arg0}_{i_0, \ldots, i_{n-1}}\, \texttt{||}\, \texttt{arg1}_{i_0, \ldots, i_{n-1}}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}}\, \mathtt{||}\, \mathtt{arg1}_{i_0, \ldots, i_{n-1}}
C++ Interface
......
.. parameter.rst
#########
Parameter
#########
.. code-block: cpp
Parameter // A function parameter.
Description
===========
Parameters are nodes that represent the arguments that will be passed
to user-defined functions. Function creation requires a sequence of
parameters.
Attributes
----------
+------------------+------------------------------------------+
| Name | Description |
+==================+==========================================+
| ``element_type`` | The ``element::Type`` of the parameter. |
+------------------+------------------------------------------+
| ``shape`` | The ``Shape`` of the parameter. |
+------------------+------------------------------------------+
Outputs
-------
+------------+------------------+------------+
| Name | Element type | Shape |
+============+==================+============+
| ``output`` | ``element_type`` | ``shape`` |
+------------+------------------+------------+
A ``Parameter`` produces the value of the tensor passed to the function in the position of the parameter in the function's arguments. The passed tensor must have the element type and shape specified by the parameter.
Backprop
========
.. math::
\leftarrow \Delta
C++ Interface
=============
.. doxygenclass:: ngraph::op::Parameter
:project: ngraph
:members:
.. power.rst:
#####
Power
#####
.. code-block:: cpp
Power // Elementwise exponentiation operation
Description
===========
Elementwise exponentiation operation.
Inputs
------
+-----------------+-------------------------+--------------------------------+
| Name | Element Type | Shape |
+=================+=========================+================================+
| ``arg0`` | any | any |
+-----------------+-------------------------+--------------------------------+
| ``arg1`` | same as ``arg0`` | same as ``arg0`` |
+-----------------+-------------------------+--------------------------------+
Outputs
-------
+-----------------+-------------------------+--------------------------------+
| Name | Element Type | Shape |
+=================+=========================+================================+
| ``output`` | same as ``arg0`` | same as ``arg0`` |
+-----------------+-------------------------+--------------------------------+
Mathematical Definition
=======================
.. math::
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}} ^ {\mathtt{arg1}_{i_0, \ldots, i_{n-1}}}
Backprop
========
.. math::
\overline{\mathtt{arg0}} &\leftarrow \frac{\Delta \cdot \mathtt{arg1}}{\mathtt{arg0}} \\
\overline{\mathtt{arg1}} &\leftarrow \Delta \cdot \mathtt{output} \cdot \log(\mathtt{arg1})
C++ Interface
=============
.. doxygenclass:: ngraph::op::Power
:project: ngraph
:members:
.. product.rst:
#######
Product
#######
.. code-block:: cpp
Product // Product reduction operation.
Description
===========
Reduces the tensor, eliminating the specified reduction axes by taking the product.
Inputs
------
+-----------------+-------------------------+--------------------------------+
| Name | Element Type | Shape |
+=================+=========================+================================+
| ``arg`` | Any | Any |
+-----------------+-------------------------+--------------------------------+
Attributes
----------
+--------------------+----------------------------------------------------------------+
| Name | Description |
+====================+================================================================+
| ``reduction_axes`` | The axis positions (0-based) on which to calculate the product |
+--------------------+----------------------------------------------------------------+
Outputs
-------
+-----------------+-------------------------+---------------------------------------------------+
| Name | Element Type | Shape |
+=================+=========================+===================================================+
| ``output`` | Same as ``arg`` | Same as ``arg``, with ``reduction_axes`` removed. |
+-----------------+-------------------------+---------------------------------------------------+
Mathematical Definition
=======================
.. math::
\mathit{product}\left(\{0\},
\left[ \begin{array}{ccc}
1 & 2 \\
3 & 4 \\
5 & 6 \end{array} \right]\right) &=
\left[ (1 * 3 * 5), (2 * 4 * 6) \right] =
\left[ 15, 48 \right]&\text{ dimension 0 (rows) is eliminated} \\
\mathit{product}\left(\{1\},
\left[ \begin{array}{ccc}
1 & 2 \\
3 & 4 \\
5 & 6 \end{array} \right]\right) &=
\left[ (1 * 2), (3 * 4), (5 * 6) \right] =
\left[ 2, 12, 30 \right]&\text{ dimension 1 (columns) is eliminated}\\
\mathit{product}\left(\{0,1\},
\left[ \begin{array}{ccc}
1 & 2 \\
3 & 4 \\
5 & 6 \end{array} \right]\right) &=
(1 * 2) * (3 * 4) * (5 * 6) =
720&\text{ both dimensions (rows and columns) are eliminated}
C++ Interface
=============
.. doxygenclass:: ngraph::op::Product
:project: ngraph
:members:
.. relu.rst:
####
Relu
####
.. code-block:: cpp
Relu // Elementwise relu operation
Inputs
------
+-----------------+-------------------------+--------------------------------+
| Name | Element Type | Shape |
+=================+=========================+================================+
| ``arg`` | Any | Any |
+-----------------+-------------------------+--------------------------------+
Outputs
-------
+-----------------+-------------------------+--------------------------------+
| Name | Element Type | Shape |
+=================+=========================+================================+
| ``output`` | Same as ``arg`` | Same as ``arg`` |
+-----------------+-------------------------+--------------------------------+
Mathematical Definition
=======================
.. math::
\mathtt{output}_{i_0, \ldots, i_{n-1}} =
\begin{cases}
0&\text{if }\mathtt{arg}_{i_0, \ldots, i_{n-1}} \le 0 \\
\mathtt{arg}_{i_0, \ldots, i_{n-1}}&\text{otherwise}
\end{cases}
C++ Interface
=============
.. doxygenclass:: ngraph::op::Relu
:project: ngraph
:members:
......@@ -29,18 +29,6 @@ namespace ngraph
/// Parameters are nodes that represent the arguments that will be passed to user-defined functions.
/// Function creation requires a sequence of parameters.
/// Basic graph operations do not need parameters attached to a function.
///
/// ## Parameters
///
/// | | Description |
/// | -------------| ---------------------------------- |
/// | `value_type` | The type \f$T\f$ of the parameter. |
///
/// ## Output
///
/// | Type | Description |
/// | ------- | --------------------------------------------------------------------------------------------------------------------------- |
/// | \f$T\f$ | The value of the parameter, supplied by the `FunctionCall` to this function. |
class Parameter : public op::Op
{
protected:
......
......@@ -26,56 +26,6 @@ namespace ngraph
/// \brief Product reduction operation.
///
/// Reduces the tensor, eliminating the specified reduction axes by taking the product.
///
/// \f[
/// \mathit{product}\left(\{0\},
/// \left[ \begin{array}{ccc}
/// 1 & 2 \\
/// 3 & 4 \\
/// 5 & 6 \end{array} \right]\right) =
/// \left[ (1 * 3 * 5), (2 * 4 * 6) \right] =
/// \left[ 15, 48 \right]~~~\text{(dimension 0 (rows) is eliminated)}
/// \f]
///
/// \f[
/// \mathit{product}\left(\{1\},
/// \left[ \begin{array}{ccc}
/// 1 & 2 \\
/// 3 & 4 \\
/// 5 & 6 \end{array} \right]\right) =
/// \left[ (1 * 2), (3 * 4), (5 * 6) \right] =
/// \left[ 2, 12, 30 \right]~~~\text{(dimension 1 (columns) is eliminated)}
/// \f]
///
/// \f[
/// \mathit{product}\left(\{0,1\},
/// \left[ \begin{array}{ccc}
/// 1 & 2 \\
/// 3 & 4 \\
/// 5 & 6 \end{array} \right]\right) =
/// (1 * 2) * (3 * 4) * (5 * 6) =
/// 720~~~\text{(both dimensions (rows and columns) are eliminated)}
/// \f]
///
/// This is equivalent to Reduce where `arg_init` = 1 and `reduction_function` is \f$f(x,y) = x*y\f$.
///
/// ## Parameters
///
/// | | Description |
/// | -------------------- | -------------------------------------- |
/// | `reduction_axes` | The axes to eliminate through product. |
///
/// ## Inputs
///
/// | | Type | Description |
/// | ----- | --------------------------------- | ------------------------------------------------------ |
/// | `arg` | \f$N[d_1,\dots,d_n]~(n \geq 0)\f$ | An input tensor of any shape and numeric element type. |
///
/// ## Output
///
/// | Type | Description |
/// | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
/// | \f$N[\textit{delete}(A,d_1,\dots,d_n)]\f$ | The tensor \f$T\f$, where \f$T\f$ is the input tensor with the `reduction_axes` \f$A\f$ eliminated by product. |
class Product : public util::ArithmeticReduction
{
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment