Skip to content

Commit

Permalink
math formula fixes 2021.2 (#3514)
Browse files Browse the repository at this point in the history
* math formula fix

* ops math formula fix

Co-authored-by: Nikolay Tyukaev <[email protected]>
  • Loading branch information
ntyukaev and Nikolay Tyukaev authored Dec 9, 2020
1 parent 3d48b7f commit 6b8f778
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1582,9 +1582,9 @@ OI, which means that Input changes the fastest, then Output.

**Mathematical Formulation**

\f[
output[:, ... ,:, i, ... , j,:, ... ,:] = input2[:, ... ,:, input1[i, ... ,j],:, ... ,:]
\f]
\f[
output[:, ... ,:, i, ... , j,:, ... ,:] = input2[:, ... ,:, input1[i, ... ,j],:, ... ,:]
\f]


**Inputs**
Expand Down Expand Up @@ -5086,7 +5086,9 @@ t \in \left ( 0, \quad tiles \right )

Output tensor is populated by values computes in the following way:

output[i1, ..., i(axis-1), j, i(axis+1) ..., iN] = top_k(input[i1, ...., i(axis-1), :, i(axis+1), ..., iN]), k, sort, mode)
\f[
output[i1, ..., i(axis-1), j, i(axis+1) ..., iN] = top_k(input[i1, ...., i(axis-1), :, i(axis+1), ..., iN]), k, sort, mode)
\f]

So for each slice `input[i1, ...., i(axis-1), :, i(axis+1), ..., iN]` which represents 1D array, top_k value is computed individually. Sorting and minimum/maximum are controlled by `sort` and `mode` attributes.

Expand Down
6 changes: 3 additions & 3 deletions docs/ops/activation/HSwish_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
**Detailed description**: For each element from the input tensor calculates corresponding
element in the output tensor with the following formula:

\f[
HSwish(x) = x \frac{min(max(x + 3, 0), 6)}{6}
\f]
\f[
HSwish(x) = x \frac{min(max(x + 3, 0), 6)}{6}
\f]

The HSwish operation is introduced in the following [article](https://arxiv.org/pdf/1905.02244.pdf).

Expand Down
6 changes: 3 additions & 3 deletions docs/ops/activation/Mish_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

For each element from the input tensor calculates corresponding
element in the output tensor with the following formula:
\f[
Mish(x) = x*tanh(ln(1.0+e^{x}))
\f]
\f[
Mish(x) = x*tanh(ln(1.0+e^{x}))
\f]

**Examples**

Expand Down
6 changes: 3 additions & 3 deletions docs/ops/activation/Sigmoid_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

For each element from the input tensor calculates corresponding
element in the output tensor with the following formula:
\f[
sigmoid( x ) = \frac{1}{1+e^{-x}}
\f]
\f[
sigmoid( x ) = \frac{1}{1+e^{-x}}
\f]

**Inputs**:

Expand Down
6 changes: 3 additions & 3 deletions docs/ops/activation/SoftPlus_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
**Detailed description**: For each element from the input tensor calculates corresponding
element in the output tensor with the following formula:

\f[
SoftPlus(x) = ln(e^{x} + 1.0)
\f]
\f[
SoftPlus(x) = ln(e^{x} + 1.0)
\f]

**Attributes**: *SoftPlus* operation has no attributes.

Expand Down
6 changes: 3 additions & 3 deletions docs/ops/activation/Swish_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
**Detailed description**: For each element from the input tensor calculates corresponding
element in the output tensor with the following formula:

\f[
Swish(x) = x / (1.0 + e^{-(beta * x)})
\f]
\f[
Swish(x) = x / (1.0 + e^{-(beta * x)})
\f]

The Swish operation is introduced in the [article](https://arxiv.org/pdf/1710.05941.pdf).

Expand Down
6 changes: 3 additions & 3 deletions docs/ops/pooling/AvgPool_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@

**Mathematical Formulation**

\f[
output_{j} = \frac{\sum_{i = 0}^{n}x_{i}}{n}
\f]
\f[
output_{j} = \frac{\sum_{i = 0}^{n}x_{i}}{n}
\f]

**Example**

Expand Down
6 changes: 3 additions & 3 deletions docs/ops/pooling/MaxPool_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@

**Mathematical Formulation**

\f[
output_{j} = MAX\{ x_{0}, ... x_{i}\}
\f]
\f[
output_{j} = MAX\{ x_{0}, ... x_{i}\}
\f]

**Example**

Expand Down

0 comments on commit 6b8f778

Please sign in to comment.