Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
ab28a4a1
Unverified
Commit
ab28a4a1
authored
Oct 16, 2018
by
Scott Cyphers
Committed by
GitHub
Oct 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc for result and subtract. (#1837)
parent
1ef7612a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
14 deletions
+118
-14
index.rst
doc/sphinx/source/ops/index.rst
+4
-0
result.rst
doc/sphinx/source/ops/result.rst
+50
-0
subtract.rst
doc/sphinx/source/ops/subtract.rst
+63
-0
result.hpp
src/ngraph/op/result.hpp
+1
-1
subtract.hpp
src/ngraph/op/subtract.hpp
+0
-13
No files found.
doc/sphinx/source/ops/index.rst
View file @
ab28a4a1
...
...
@@ -94,12 +94,14 @@ Not currently a comprehensive list.
* :doc:`power`
* :doc:`product`
* :doc:`relu`
* :doc:`result`
* :doc:`sigmoid`
* :doc:`sign`
* :doc:`sin`
* :doc:`sinh`
* :doc:`softmax`
* :doc:`sqrt`
* :doc:`subtract`
* :doc:`tan`
* :doc:`tanh`
...
...
@@ -155,11 +157,13 @@ Not currently a comprehensive list.
power.rst
product.rst
relu.rst
result.rst
sigmoid.rst
sign.rst
sin.rst
sinh.rst
softmax.rst
sqrt.rst
subtract.rst
tan.rst
tanh.rst
doc/sphinx/source/ops/result.rst
0 → 100644
View file @
ab28a4a1
.. result.rst:
######
Result
######
.. code-block:: cpp
Result // Allow a value to be a result
Description
===========
Captures a value for use as a function result. The output of the
op is the same as the input.
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} = \mathtt{arg}
C++ Interface
=============
.. doxygenclass:: ngraph::op::Result
:project: ngraph
:members:
doc/sphinx/source/ops/subtract.rst
0 → 100644
View file @
ab28a4a1
.. subtract.rst:
########
Subtract
########
.. code-block:: cpp
Subtract // Elementwise subtract operation
Description
===========
Elementwise subtract operation.
Produces tensor of the same element type and shape as the two inputs,
where the value at each coordinate of ``output`` is the difference of the
values at the corresponding input coordinates.
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 \Delta \\
\overline{\mathtt{arg1}} &\leftarrow -\Delta
C++ Interface
=============
.. doxygenclass:: ngraph::op::Subtract
:project: ngraph
:members:
src/ngraph/op/result.hpp
View file @
ab28a4a1
...
...
@@ -27,7 +27,7 @@ namespace ngraph
class
Result
:
public
Op
{
public
:
/// \brief
Constructs an arcsin operation
.
/// \brief
Allows a value to be used as a function result
.
///
/// \param arg Node that produces the input tensor.
Result
(
const
std
::
shared_ptr
<
Node
>&
arg
);
...
...
src/ngraph/op/subtract.hpp
View file @
ab28a4a1
...
...
@@ -23,19 +23,6 @@ namespace ngraph
namespace
op
{
/// \brief Elementwise subtraction operation.
///
/// ## Inputs
///
/// | | Type | Description |
/// | ------ | --------------------------------- | ------------------------------------------------------ |
/// | `arg0` | \f$N[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of any shape and numeric element type. |
/// | `arg1` | \f$N[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of the same shape and element type as `arg0`. |
///
/// ## Output
///
/// | Type | Description |
/// | ---------------------- | -------------------------------------------------------------------------------------------------------------- |
/// | \f$N[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = \texttt{arg0}[i_1,\dots,i_n] - \texttt{arg1}[i_1,\dots,i_n]\f$ |
class
Subtract
:
public
util
::
BinaryElementwiseArithmetic
{
public
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment