!12377 [Docs] update formulas for math and array operators

From: @david-he91
Reviewed-by: @liangchenghui,@ljl0711
Signed-off-by: @liangchenghui
This commit is contained in:
mindspore-ci-bot 2021-02-18 13:48:05 +08:00 committed by Gitee
commit 07e3ed7a03
2 changed files with 15 additions and 0 deletions

View File

@ -3275,7 +3275,9 @@ class ScatterUpdate(_ScatterOp_Dynamic):
Using given values to update tensor value, along with the input indices.
for each `i, ..., j` in `indices.shape`:
.. math::
\text{input_x}[\text{indices}[i, ..., j], :] = \text{updates}[i, ..., j, :]
Inputs of `input_x` and `updates` comply with the implicit type conversion rules to make the data types consistent.
@ -3391,7 +3393,9 @@ class ScatterMax(_ScatterOp):
This operation outputs the `input_x` after the update is done, which makes it convenient to use the updated value.
for each `i, ..., j` in `indices.shape`:
.. math::
\text{input_x}[\text{indices}[i, ..., j], :]
= max(\text{input_x}[\text{indices}[i, ..., j], :], \text{updates}[i, ..., j, :])
@ -3435,7 +3439,9 @@ class ScatterMin(_ScatterOp):
This operation outputs the `input_x` after the update is done, which makes it convenient to use the updated value.
for each `i, ..., j` in `indices.shape`:
.. math::
\text{input_x}[\text{indices}[i, ..., j], :]
= min(\text{input_x}[\text{indices}[i, ..., j], :], \text{updates}[i, ..., j, :])
@ -3479,7 +3485,9 @@ class ScatterAdd(_ScatterOp_Dynamic):
This operation outputs the `input_x` after the update is done, which makes it convenient to use the updated value.
for each `i, ..., j` in `indices.shape`:
.. math::
\text{input_x}[\text{indices}[i, ..., j], :] \mathrel{+}= \text{updates}[i, ..., j, :]
Inputs of `input_x` and `updates` comply with the implicit type conversion rules to make the data types consistent.
@ -3529,7 +3537,9 @@ class ScatterSub(_ScatterOp):
This operation outputs the `input_x` after the update is done, which makes it convenient to use the updated value.
for each `i, ..., j` in `indices.shape`:
.. math::
\text{input_x}[\text{indices}[i, ..., j], :] \mathrel{-}= \text{updates}[i, ..., j, :]
Inputs of `input_x` and `updates` comply with the implicit type conversion rules to make the data types consistent.
@ -3573,7 +3583,9 @@ class ScatterMul(_ScatterOp):
This operation outputs the `input_x` after the update is done, which makes it convenient to use the updated value.
for each `i, ..., j` in `indices.shape`:
.. math::
\text{input_x}[\text{indices}[i, ..., j], :] \mathrel{*}= \text{updates}[i, ..., j, :]
Inputs of `input_x` and `updates` comply with the implicit type conversion rules to make the data types consistent.
@ -3616,7 +3628,9 @@ class ScatterDiv(_ScatterOp):
This operation outputs the `input_x` after the update is done, which makes it convenient to use the updated value.
for each `i, ..., j` in `indices.shape`:
.. math::
\text{input_x}[\text{indices}[i, ..., j], :] \mathrel{/}= \text{updates}[i, ..., j, :]
Inputs of `input_x` and `updates` comply with the implicit type conversion rules to make the data types consistent.

View File

@ -794,6 +794,7 @@ class BatchMatMul(MatMul):
Computes matrix multiplication between two tensors by batch.
.. math::
\text{output}[..., :, :] = \text{matrix}(a[..., :, :]) * \text{matrix}(b[..., :, :])
The two input tensors must have the same rank and the rank must be not less than `3`.