Browse Source

modify doc apiformat

feature/build-system-rewrite
xumengjuan1 4 years ago
parent
commit
3beb64132f
4 changed files with 8 additions and 9 deletions
  1. +1
    -3
      docs/api/api_python/mindspore.common.initializer.rst
  2. +1
    -0
      docs/api/api_python/mindspore/mindspore.Tensor.rst
  3. +5
    -5
      mindspore/python/mindspore/ops/operations/custom_ops.py
  4. +1
    -1
      mindspore/python/mindspore/ops/operations/nn_ops.py

+ 1
- 3
docs/api/api_python/mindspore.common.initializer.rst View File

@@ -200,9 +200,7 @@ mindspore.common.initializer

- **scale** (float) - 比例因子,默认值为1.0。
- **mode** (str) - 其值应为"fan_in","fan_out"或者"fan_avg",默认值为"fan_in"。
- **distribution** (str) - 用于采样的分布类型。它可以是"uniform","truncated_normal"或"untruncated_normal",
默认值为"truncated_normal"。

- **distribution** (str) - 用于采样的分布类型。它可以是"uniform","truncated_normal"或"untruncated_normal",默认值为"truncated_normal"。

**异常:**



+ 1
- 0
docs/api/api_python/mindspore/mindspore.Tensor.rst View File

@@ -12,6 +12,7 @@ mindspore.Tensor
- **shape** (Union[tuple, list, int]) - 用于定义该Tensor的形状。如果指定了 `input_data` ,则无需设置该参数。默认值:None。
- **init** (Initializer) - 用于在并行模式中延迟Tensor的数据的初始化,如果指定该参数,则 `dtype` 和 `shape` 也必须被指定。不推荐在非自动并行之外的场景下使用该接口。只有当调用 `Tensor.init_data` 时,才会使用指定的 `init` 来初始化Tensor数据。默认值:None。
- **internal** (bool) - Tensor是否由框架创建。 如果为True,表示Tensor是由框架创建的,如果为False,表示Tensor是由用户创建的。默认值:False。
**输出:**

Tensor。


+ 5
- 5
mindspore/python/mindspore/ops/operations/custom_ops.py View File

@@ -106,13 +106,13 @@ class Custom(ops.PrimitiveWithInfer):

Examples: see details in tests/st/ops/graph_kernel/custom/aot_test_files/

- Use it in Custom:
- Use it in Custom:

.. code-block::
.. code-block::

Custom(func="{dir_path}/{file_name}:{func_name}",...)
(ex. Custom(func="./reorganize.so:CustomReorganize", out_shape=[1], out_dtype=mstype.float32,
"aot")
Custom(func="{dir_path}/{file_name}:{func_name}",...)
(ex. Custom(func="./reorganize.so:CustomReorganize", out_shape=[1], out_dtype=mstype.float32,
"aot")

2. for "julia":



+ 1
- 1
mindspore/python/mindspore/ops/operations/nn_ops.py View File

@@ -6970,7 +6970,7 @@ class CTCGreedyDecoder(PrimitiveWithCheck):

class BasicLSTMCell(PrimitiveWithInfer):
"""
It's similar to operator :class:`DynamicRNN`. BasicLSTMCell will be deprecated in the future.
It's similar to operator :class:`mindspore.ops.DynamicRNN`. BasicLSTMCell will be deprecated in the future.
Please use DynamicRNN instead.

Supported Platforms:


Loading…
Cancel
Save