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
2aa7899c
Commit
2aa7899c
authored
Oct 01, 2018
by
Scott Cyphers
Committed by
Robert Kimball
Oct 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sigmoid and tanh doc, edit for abs (#1704)
* Sigmoid and tanh doc, edit for abs * Add equation for sigmoid.
parent
f81917b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
34 deletions
+58
-34
sigmoid.rst
doc/sphinx/source/ops/sigmoid.rst
+12
-5
tanh.rst
doc/sphinx/source/ops/tanh.rst
+46
-17
tanh.hpp
src/ngraph/op/tanh.hpp
+0
-12
No files found.
doc/sphinx/source/ops/sigmoid.rst
View file @
2aa7899c
...
...
@@ -8,6 +8,15 @@ Sigmoid
Sigmoid // Elementwise sigmoid operation
Description
===========
Produces a single output tensor of the same element type and shape as
``arg,`` where the value at each coordinate of ``output`` is the
sigmoid of ``arg`` at the same coordinate.
Inputs
------
...
...
@@ -31,11 +40,9 @@ 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}
\mathtt{output}_{i_0, \ldots, i_{n-1}} = \frac{1}{1+\exp(-\mathtt{arg}_{i_0,
\ldots, i_{n-1}})}
C++ Interface
=============
...
...
doc/sphinx/source/ops/tanh.rst
View file @
2aa7899c
...
...
@@ -8,22 +8,51 @@ Tanh
Tanh // Elementwise hyperbolic tangent operation.
.. /// \brief Elementwise hyperbolic tangent operation.
///
/// ## Inputs
///
/// | | Type | Description |
/// | ----- | --------------------------------- | ----------------------------------------------- |
/// | `arg` | \f$N[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of any shape and numeric element type. |
///
/// ## Output
///
/// | Type | Description |
/// | ---------------------- | ------------------------------------------------------------------------------------- |
/// | \f$N[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = \tanh(\texttt{arg}[i_1,\dots,i_n])\f$ |
.. /// \brief Constructs a hyperbolic tangent operation.
///
/// \param arg Node that produces the input tensor.
Description
===========
Produce a tensor with the same shape and element typye as ``arg,``
where the value at each coordinate of ``output`` is the hyperbolic
tangent of the value of ``arg`` at the same coordinate.
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}} = \tanh(\mathtt{arg}_{i_0,
\ldots, i_{n-1}})
Backprop
========
.. math::
\overline{\mathtt{arg}} \leftarrow \Delta\ (1 - \texttt{output}^2)
C++ Interface
=============
.. doxygenclass:: ngraph::op::Tanh
:project: ngraph
:members:
src/ngraph/op/tanh.hpp
View file @
2aa7899c
...
...
@@ -23,18 +23,6 @@ namespace ngraph
namespace
op
{
/// \brief Elementwise hyperbolic tangent operation.
///
/// ## Inputs
///
/// | | Type | Description |
/// | ----- | --------------------------------- | ----------------------------------------------- |
/// | `arg` | \f$N[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of any shape and numeric element type. |
///
/// ## Output
///
/// | Type | Description |
/// | ---------------------- | ------------------------------------------------------------------------------------- |
/// | \f$N[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = \tanh(\texttt{arg}[i_1,\dots,i_n])\f$ |
class
Tanh
:
public
util
::
UnaryElementwiseArithmetic
{
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