Browse Source

!12626 Fix some error format of api comments.

From: @zhang_yi2020
Reviewed-by: @liangchenghui,@wuxuejian
Signed-off-by: @liangchenghui
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 4 years ago
parent
commit
2191fa3a2e
4 changed files with 11 additions and 11 deletions
  1. +4
    -4
      mindspore/common/initializer.py
  2. +5
    -5
      mindspore/context.py
  3. +1
    -1
      mindspore/train/callback/_summary_collector.py
  4. +1
    -1
      mindspore/train/summary/summary_record.py

+ 4
- 4
mindspore/common/initializer.py View File

@@ -229,10 +229,10 @@ class XavierUniform(Initializer):
Initialize the array with xavier uniform algorithm, and from a uniform distribution collect samples within
U[-boundary, boundary] The boundary is defined as :

where :math:`boundary = gain * \sqrt{\frac{6}{n_{in} + n_{out}}}`.
where :math:`boundary = gain * \sqrt{\frac{6}{n_{in} + n_{out}}}`.

where :math:`n_{in}` is the number of input units in the weight tensor.
where :math:`n_{out}` is the number of output units in the weight tensor.
- where :math:`n_{in}` is the number of input units in the weight tensor.
- where :math:`n_{out}` is the number of output units in the weight tensor.

Args:
gain (Array): The array to be assigned. Default: 1.
@@ -259,7 +259,7 @@ class HeUniform(Initializer):
Initialize the array with He kaiming uniform algorithm, and from a uniform distribution collect samples within
U[-boundary, boundary] The boundary is defined as :

where :math:`boundary = \sqrt{\frac{6}{(1 + a^2) \times \text{fan_in}}}`.
where :math:`boundary = \sqrt{\frac{6}{(1 + a^2) \times \text{fan_in}}}`.

Args:
negative_slope (int, float, bool): Default: 0, used when nonlinearity is 'leaky_relu'.


+ 5
- 5
mindspore/context.py View File

@@ -682,11 +682,11 @@ class ParallelMode:
There are five kinds of parallel modes, "STAND_ALONE", "DATA_PARALLEL",
"HYBRID_PARALLEL", "SEMI_AUTO_PARALLEL" and "AUTO_PARALLEL". Default: "STAND_ALONE".

- STAND_ALONE: Only one processor is working.
- DATA_PARALLEL: Distributes the data across different processors.
- HYBRID_PARALLEL: Achieves data parallelism and model parallelism manually.
- SEMI_AUTO_PARALLEL: Achieves data parallelism and model parallelism by setting parallel strategies.
- AUTO_PARALLEL: Achieves parallelism automatically.
- STAND_ALONE: Only one processor is working.
- DATA_PARALLEL: Distributes the data across different processors.
- HYBRID_PARALLEL: Achieves data parallelism and model parallelism manually.
- SEMI_AUTO_PARALLEL: Achieves data parallelism and model parallelism by setting parallel strategies.
- AUTO_PARALLEL: Achieves parallelism automatically.

MODE_LIST: The list of all supported parallel modes.
"""


+ 1
- 1
mindspore/train/callback/_summary_collector.py View File

@@ -138,7 +138,7 @@ class SummaryCollector(Callback):
- tensor_format (Union[str, None]): Customize the export tensor format. Supports ["npy", None].
Default: None, it means that the tensor is not exported.

- npy: export tensor as npy file.
- npy: export tensor as npy file.

Raises:
ValueError: If the parameter value is not expected.


+ 1
- 1
mindspore/train/summary/summary_record.py View File

@@ -123,7 +123,7 @@ class SummaryRecord:
- tensor_format (Union[str, None]): Customize the export tensor format. Supports ["npy", None].
Default: None, it means that the tensor is not exported.

- npy: export tensor as npy file.
- npy: export tensor as npy file.

Raises:
TypeError: If the parameter type is incorrect.


Loading…
Cancel
Save