forked from huawei/mindspore2022
fix some code spell errors in ops/operations
modified: mindspore/ops/operations/_embedding_cache_ops.py modified: mindspore/ops/operations/_inner_ops.py modified: mindspore/ops/operations/_quant_ops.py modified: mindspore/ops/operations/array_ops.py modified: mindspore/ops/operations/inner_ops.py modified: mindspore/ops/operations/nn_ops.py modified: mindspore/ops/operations/quantum_ops.py
This commit is contained in:
parent
11d6b435c2
commit
3f4b1dddb5
|
|
@ -22,7 +22,7 @@ from .. import signature as sig
|
|||
class UpdateCache(PrimitiveWithCheck):
|
||||
"""
|
||||
Update the value fo input_x, similar to ScatterNdUpdate.
|
||||
The diffirent is that UpdateCache will not update when indices < 0 or indices >= max_num.
|
||||
The difference is that UpdateCache will not update when indices < 0 or indices >= max_num.
|
||||
|
||||
Inputs:
|
||||
- **input_x** (Parameter) - Parameter which is going to be updated.
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ class Receive(PrimitiveWithInfer):
|
|||
receive tensors from src_rank.
|
||||
|
||||
Note:
|
||||
Send and Recveive must be used in combination and have same sr_tag.
|
||||
Send and Receive must be used in combination and have same sr_tag.
|
||||
Receive must be used between servers.
|
||||
|
||||
Args:
|
||||
|
|
|
|||
|
|
@ -331,13 +331,13 @@ class FakeLearnedScaleQuantPerLayerGradDReduce(PrimitiveWithInfer):
|
|||
|
||||
class FakeLearnedScaleQuantPerChannel(PrimitiveWithInfer):
|
||||
r"""
|
||||
Simulates the quantize and dequantize operations of the fake learned scale quant per-chnnel case in training time.
|
||||
Simulates the quantize and dequantize operations of the fake learned scale quant per-channel case in training time.
|
||||
|
||||
Args:
|
||||
quant_delay (int): Quantilization delay parameter. Before delay step in training time not update
|
||||
simulate quantization aware function. After delay step in training time begin simulate the aware
|
||||
quantize function. Default: 0.
|
||||
neg_trunc (bool): Whether the quantization algorithm uses nagetive truncation or not. Default: False.
|
||||
neg_trunc (bool): Whether the quantization algorithm uses negative truncation or not. Default: False.
|
||||
training (bool): Training the network or not. Default: True.
|
||||
channel_axis (int): Quantization by channel axis. Ascend backend only supports 0 or 1. Default: 1.
|
||||
|
||||
|
|
|
|||
|
|
@ -3114,7 +3114,7 @@ class StridedSlice(PrimitiveWithInfer):
|
|||
>>> # ]
|
||||
>>> # The final output after finishing is:
|
||||
[[[3], [5]]]
|
||||
>>> # anothor example like :
|
||||
>>> # another example like :
|
||||
>>> output = strided_slice(input_x, (1, 0, 0), (2, 1, 3), (1, 1, 1))
|
||||
>>> print(output)
|
||||
[[[3. 3. 3.]]]
|
||||
|
|
@ -3929,7 +3929,7 @@ class ScatterMax(_ScatterOp):
|
|||
Raises:
|
||||
TypeError: If `use_locking` is not a bool.
|
||||
TypeError: If `indices` is not an int32.
|
||||
ValueError: If the shape of `updates` is note euqal to `indices_shape + x_shape[1:]`.
|
||||
ValueError: If the shape of `updates` is not equal to `indices_shape + x_shape[1:]`.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``CPU``
|
||||
|
|
@ -3982,7 +3982,7 @@ class ScatterMin(_ScatterOp):
|
|||
Raises:
|
||||
TypeError: If `use_locking` is not a bool.
|
||||
TypeError: If `indices` is not an int32.
|
||||
ValueError: If the shape of `updates` is note euqal to `indices_shape + x_shape[1:]`.
|
||||
ValueError: If the shape of `updates` is not equal to `indices_shape + x_shape[1:]`.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``CPU``
|
||||
|
|
@ -4037,7 +4037,7 @@ class ScatterAdd(_ScatterOpDynamic):
|
|||
Raises:
|
||||
TypeError: If `use_locking` is not a bool.
|
||||
TypeError: If `indices` is not an int32.
|
||||
ValueError: If the shape of `updates` is note euqal to `indices_shape + x_shape[1:]`.
|
||||
ValueError: If the shape of `updates` is not equal to `indices_shape + x_shape[1:]`.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``GPU`` ``CPU``
|
||||
|
|
@ -4146,7 +4146,7 @@ class ScatterSub(_ScatterOp):
|
|||
Raises:
|
||||
TypeError: If `use_locking` is not a bool.
|
||||
TypeError: If `indices` is not an int32.
|
||||
ValueError: If the shape of `updates` is note euqal to `indices_shape + x_shape[1:]`.
|
||||
ValueError: If the shape of `updates` is not equal to `indices_shape + x_shape[1:]`.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``CPU``
|
||||
|
|
@ -4248,7 +4248,7 @@ class ScatterMul(_ScatterOp):
|
|||
Raises:
|
||||
TypeError: If `use_locking` is not a bool.
|
||||
TypeError: If `indices` is not an int32.
|
||||
ValueError: If the shape of `updates` is note euqal to `indices_shape + x_shape[1:]`.
|
||||
ValueError: If the shape of `updates` is not equal to `indices_shape + x_shape[1:]`.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``CPU``
|
||||
|
|
@ -4350,7 +4350,7 @@ class ScatterDiv(_ScatterOp):
|
|||
Raises:
|
||||
TypeError: If `use_locking` is not a bool.
|
||||
TypeError: If `indices` is not an int32.
|
||||
ValueError: If the shape of `updates` is note euqal to `indices_shape + x_shape[1:]`.
|
||||
ValueError: If the shape of `updates` is not equal to `indices_shape + x_shape[1:]`.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``CPU``
|
||||
|
|
@ -4459,7 +4459,7 @@ class ScatterNdAdd(_ScatterNdOp):
|
|||
Raises:
|
||||
TypeError: If `use_locking` is not a bool.
|
||||
TypeError: If `indices` is not an int32.
|
||||
ValueError: If the shape of `updates` is note euqal to `indices_shape[:-1] + x_shape[indices_shape[-1]:]`.
|
||||
ValueError: If the shape of `updates` is not equal to `indices_shape[:-1] + x_shape[indices_shape[-1]:]`.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend``
|
||||
|
|
@ -4536,7 +4536,7 @@ class ScatterNdSub(_ScatterNdOp):
|
|||
Raises:
|
||||
TypeError: If `use_locking` is not a bool.
|
||||
TypeError: If `indices` is not an int32.
|
||||
ValueError: If the shape of `updates` is note euqal to `indices_shape[:-1] + x_shape[indices_shape[-1]:]`.
|
||||
ValueError: If the shape of `updates` is not equal to `indices_shape[:-1] + x_shape[indices_shape[-1]:]`.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend``
|
||||
|
|
@ -4599,7 +4599,7 @@ class ScatterNonAliasingAdd(_ScatterNdOp):
|
|||
Raises:
|
||||
TypeError: If dtype of `indices` is not int32.
|
||||
TypeError: If dtype of `input_x` is not one of float16, float32, int32.
|
||||
ValueError: If the shape of `updates` is note euqal to `indices_shape[:-1] + x_shape[indices_shape[-1]:]`.
|
||||
ValueError: If the shape of `updates` is not equal to `indices_shape[:-1] + x_shape[indices_shape[-1]:]`.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend``
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ class LambApplyOptimizerAssign(PrimitiveWithInfer):
|
|||
r"""
|
||||
Updates gradients by LAMB optimizer algorithm. Get the compute ratio.
|
||||
|
||||
The Lamb optimzier is proposed in `Large Batch Optimization for Deep Learning: Training BERT in 76 minutes
|
||||
The Lamb optimizer is proposed in `Large Batch Optimization for Deep Learning: Training BERT in 76 minutes
|
||||
<https://arxiv.org/abs/1904.00962>`_.
|
||||
|
||||
The updating formulas are as follows,
|
||||
|
|
@ -280,7 +280,7 @@ class LambApplyWeightAssign(PrimitiveWithInfer):
|
|||
r"""
|
||||
Updates gradients by LAMB optimizer algorithm. The weight update part.
|
||||
|
||||
The Lamb optimzier is proposed in `Large Batch Optimization for Deep Learning: Training BERT in 76 minutes
|
||||
The Lamb optimizer is proposed in `Large Batch Optimization for Deep Learning: Training BERT in 76 minutes
|
||||
<https://arxiv.org/abs/1904.00962>`_.
|
||||
|
||||
The updating formulas are as follows,
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class AdaptiveAvgPool2D(PrimitiveWithInfer):
|
|||
|
||||
Args:
|
||||
output_size (Union[int, tuple]): The target output size is H x W.
|
||||
ouput_size can be a tulpe, or a single H for H x H, and H x W can be int or None
|
||||
ouput_size can be a tuple, or a single H for H x H, and H x W can be int or None
|
||||
which means the output size is the same as the input.
|
||||
|
||||
Inputs:
|
||||
|
|
@ -1941,7 +1941,7 @@ class Conv2DBackpropInput(Primitive):
|
|||
- **dout** (Tensor) - the gradients write respect to the output of the convolution. The shape conforms
|
||||
to the default data_format :math:`(N, C_{out}, H_{out}, W_{out})`.
|
||||
- **weight** (Tensor) - Set size of kernel is :math:`(\text{ks_w}, \text{ks_h})`, where :math:`\text{ks_w}`
|
||||
and :math:`\text{ks_h}` are the height and width of the convolution kerenel, then the shape is
|
||||
and :math:`\text{ks_h}` are the height and width of the convolution kernel, then the shape is
|
||||
:math:`(C_{out}, C_{in}, \text{ks_w}, \text{ks_h})`.
|
||||
- **input_size** (Tensor) - A tuple describes the shape of the input which conforms to the format
|
||||
:math:`(N, C_{in}, H_{in}, W_{in})`.
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class Evolution(PrimitiveWithInfer):
|
|||
- **gate_obj_qubits** (List[List[int]]) - Object qubits of each gate.
|
||||
- **gate_ctrl_qubits** (List[List[int]]) - Control qubits of each gate.
|
||||
- **gate_params_names** (List[List[str]]) - Parameter names of each gate.
|
||||
- **gate_coeff** (List[List[float]]) - Coefficient of eqch parameter of each gate.
|
||||
- **gate_coeff** (List[List[float]]) - Coefficient of each parameter of each gate.
|
||||
- **gate_requires_grad** (List[List[bool]]) - Whether to calculate gradient
|
||||
of parameters of gates.
|
||||
- **hams_pauli_coeff** (List[List[float]]) - Coefficient of pauli words.
|
||||
|
|
|
|||
Loading…
Reference in New Issue