Browse Source

optimizes the documentation of chinese API of PrimitiveWithInfer,LayerNorm.

r1.7
zhangfanghe 4 years ago
parent
commit
d1f2c52fe3
2 changed files with 1 additions and 44 deletions
  1. +1
    -5
      docs/api/api_python/nn/mindspore.nn.LayerNorm.rst
  2. +0
    -39
      docs/api/api_python/ops/mindspore.ops.PrimitiveWithInfer.rst

+ 1
- 5
docs/api/api_python/nn/mindspore.nn.LayerNorm.rst View File

@@ -34,8 +34,4 @@ mindspore.nn.LayerNorm

- **TypeError** - `normalized_shape` 既不是列表也不是元组。
- **TypeError** - `begin_norm_axis` 或 `begin_params_axis` 不是整数。
- **TypeError** - `epsilon` 不是float。

.. py:method:: extend_repr()

实例对象显示为字符串。
- **TypeError** - `epsilon` 不是float。

+ 0
- 39
docs/api/api_python/ops/mindspore.ops.PrimitiveWithInfer.rst View File

@@ -12,42 +12,3 @@ mindspore.ops.PrimitiveWithInfer
**参数:**

- **name** (str) - 当前Primitive的名称。

.. py:method:: infer_dtype(*args)

根据输入类型推断输出类型。

**参数:**

- **args** (:class:`mindspore.dtype`) - 输入的数据类型。

**返回:**

:class:`mindspore.dtype`,输出的数据类型。

.. py:method:: infer_shape(*args)

根据输入形状推断输出形状。

.. note::
Scalar的shape是一个空元组。

**参数:**

- **args** (tuple(int)) - 输入tensor的shape。

**返回:**

`tuple(int)`,输出tensor的shape。

.. py:method:: infer_value(*args)

根据编译时的输入值推断输出值。

**参数:**

- **args** (Any) - 输入的值。

**返回:**

输出的值。如果编译时无法推断该值,返回 `None` 。

Loading…
Cancel
Save