diff --git a/mindspore/ops/operations/_embedding_cache_ops.py b/mindspore/ops/operations/_embedding_cache_ops.py old mode 100644 new mode 100755 index 26ce65d95d0..a6d1f45db5b --- a/mindspore/ops/operations/_embedding_cache_ops.py +++ b/mindspore/ops/operations/_embedding_cache_ops.py @@ -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. diff --git a/mindspore/ops/operations/_inner_ops.py b/mindspore/ops/operations/_inner_ops.py old mode 100644 new mode 100755 index 8bfffeda92c..2b8e76003d2 --- a/mindspore/ops/operations/_inner_ops.py +++ b/mindspore/ops/operations/_inner_ops.py @@ -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: diff --git a/mindspore/ops/operations/_quant_ops.py b/mindspore/ops/operations/_quant_ops.py old mode 100644 new mode 100755 index 002490e68a9..2e729f92964 --- a/mindspore/ops/operations/_quant_ops.py +++ b/mindspore/ops/operations/_quant_ops.py @@ -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. diff --git a/mindspore/ops/operations/array_ops.py b/mindspore/ops/operations/array_ops.py old mode 100644 new mode 100755 index 1a284f9be1b..98c9811332f --- a/mindspore/ops/operations/array_ops.py +++ b/mindspore/ops/operations/array_ops.py @@ -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`` diff --git a/mindspore/ops/operations/inner_ops.py b/mindspore/ops/operations/inner_ops.py old mode 100644 new mode 100755 index b8904aea045..d468bce16a6 --- a/mindspore/ops/operations/inner_ops.py +++ b/mindspore/ops/operations/inner_ops.py @@ -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 `_. 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 `_. The updating formulas are as follows, diff --git a/mindspore/ops/operations/nn_ops.py b/mindspore/ops/operations/nn_ops.py old mode 100644 new mode 100755 index 6be71d0e038..eee6b75a82c --- a/mindspore/ops/operations/nn_ops.py +++ b/mindspore/ops/operations/nn_ops.py @@ -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})`. diff --git a/mindspore/ops/operations/quantum_ops.py b/mindspore/ops/operations/quantum_ops.py old mode 100644 new mode 100755 index 485f86bb872..3d79f5d26cf --- a/mindspore/ops/operations/quantum_ops.py +++ b/mindspore/ops/operations/quantum_ops.py @@ -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.