fix some error api comments.

This commit is contained in:
zhangyi 2021-03-17 16:05:05 +08:00
parent 9295280bbe
commit 2730f95d20
7 changed files with 23 additions and 25 deletions

View File

@ -1751,12 +1751,10 @@ class MappableDataset(SourceDataset):
original dataset.
If after rounding:
- Any size equals 0, an error will occur.
- The sum of split sizes < K, the difference will be added to the first split.
- The sum of split sizes > K, the difference will be removed from the first large
enough split such that it will have at least 1 row after removing the difference.
- Any size equals 0, an error will occur.
- The sum of split sizes < K, the difference will be added to the first split.
- The sum of split sizes > K, the difference will be removed from the first large
enough split such that it will have at least 1 row after removing the difference.
randomize (bool, optional): Determines whether or not to split the data randomly (default=True).
If True, the data will be randomly split. Otherwise, each split will be created with

View File

@ -1163,9 +1163,9 @@ class Cell(Cell_):
Note:
- If the computation involves something like randomization or global variable, the equivalence
is not guaranteed currently.
is not guaranteed currently.
- If the recompute api of a primitive in this cell is also called, the recompute mode of this
primitive is subject to the recompute api of the primitive.
primitive is subject to the recompute api of the primitive.
Args:
mode (bool): Specifies whether the cell is recomputed. Default: True.

View File

@ -915,7 +915,7 @@ class InstanceNorm2d(Cell):
Supported Platforms:
``GPU``
Raise:
Raises:
TypeError: If `num_features` is not an int.
TypeError: If `eps` is not a float.
TypeError: If `momentum` is not a float.

View File

@ -535,7 +535,7 @@ def minimum(x1, x2, dtype=None):
Compares two tensors and returns a new tensor containing the element-wise minima.
Note:
Note:
Numpy arguments `out`, `where`, `casting`, `order`, `subok`, `signature`, and `extobj` are
not supported.
Unlike numpy, when one of the elements is a NaN, the second element is
@ -818,11 +818,11 @@ def tensordot(a, b, axes=2):
`a` and the first `N` dimensions of `b` are summed over.
Three common use cases are:
``axes = 0`` : tensor product
- ``axes = 0`` : tensor product
``axes = 1`` : tensor dot product
- ``axes = 1`` : tensor dot product
``axes = 2`` : (default) tensor double contraction
- ``axes = 2`` : (default) tensor double contraction
When axes is integer_like, the sequence for evaluation will be: first the `-Nth`
axis in `a` and 0th axis in `b`, and the -1th axis in `a` and `Nth` axis in `b` last.

View File

@ -2891,16 +2891,16 @@ class StridedSlice(PrimitiveWithInfer):
Tensor.
The output is explained by following example.
- In the 0th dimension, begin is 1, end is 2, and strides is 1,
because :math:`1+1=2\geq2`, the interval is :math:`[1,2)`.
Thus, return the element with :math:`index = 1` in 0th dimension, i.e., [[3, 3, 3], [4, 4, 4]].
- In the 1st dimension, similarly, the interval is :math:`[0,1)`.
Based on the return value of the 0th dimension, return the element with :math:`index = 0`,
i.e., [3, 3, 3].
- In the 2nd dimension, similarly, the interval is :math:`[0,3)`.
Based on the return value of the 1st dimension, return the element with :math:`index = 0,1,2`,
i.e., [3, 3, 3].
- Finally, the output is [3, 3, 3].
- In the 0th dimension, begin is 1, end is 2, and strides is 1,
because :math:`1+1=2\geq2`, the interval is :math:`[1,2)`.
Thus, return the element with :math:`index = 1` in 0th dimension, i.e., [[3, 3, 3], [4, 4, 4]].
- In the 1st dimension, similarly, the interval is :math:`[0,1)`.
Based on the return value of the 0th dimension, return the element with :math:`index = 0`,
i.e., [3, 3, 3].
- In the 2nd dimension, similarly, the interval is :math:`[0,3)`.
Based on the return value of the 1st dimension, return the element with :math:`index = 0,1,2`,
i.e., [3, 3, 3].
- Finally, the output is [3, 3, 3].
Raises:
TypeError: If `begin_mask`, `end_mask`, `ellipsis_mask`, `new_axis_mask` or `shrink_axis_mask` is not an int.

View File

@ -521,7 +521,7 @@ class ReLUV2(PrimitiveWithInfer):
Raises:
TypeError: If `input_x`, `output` or `mask` is not a Tensor.
TypeError: If dtype of `output` is not same as `input_x`.
TypeError: If dtype of `output` is not same as `input_x` .
TypeError: If dtype of `mask` is not unit8.
Supported Platforms:

View File

@ -228,7 +228,7 @@ class Primitive(Primitive_):
Note:
- If the computation involves something like randomization or global variable, the equivalence
is not guaranteed currently.
is not guaranteed currently.
Args:
mode (bool): Specifies whether the primitive is recomputed. Default: True.