diff --git a/docs/api/api_python/mindspore.boost.rst b/docs/api/api_python/mindspore.boost.rst index b3e4690dc9..ab9496ceeb 100644 --- a/docs/api/api_python/mindspore.boost.rst +++ b/docs/api/api_python/mindspore.boost.rst @@ -113,7 +113,7 @@ Boost能够自动加速网络,如减少BN/梯度冻结/累积梯度等。 其中: - - pca_mat (array): 维度(k*n),k是 *n_components*的大小,n是权重的大小。 + - pca_mat (array): 维度(k*n),k是 *n_components* 的大小,n是权重的大小。 - bk (array): 维度(k*k),bk是拟牛顿法中的对称正定矩阵。 我们需要找到满足以下条件的m: @@ -121,7 +121,7 @@ Boost能够自动加速网络,如减少BN/梯度冻结/累积梯度等。 .. math:: new\_loss < old\_loss + delta\_loss - 然后使用 *delta_grad*去更新模型的权重: + 然后使用 *delta_grad* 去更新模型的权重: .. math:: diff --git a/docs/api/api_python/ops/mindspore.ops.UniformCandidateSampler.rst b/docs/api/api_python/ops/mindspore.ops.UniformCandidateSampler.rst index f22a65b212..0e2a73952c 100644 --- a/docs/api/api_python/ops/mindspore.ops.UniformCandidateSampler.rst +++ b/docs/api/api_python/ops/mindspore.ops.UniformCandidateSampler.rst @@ -10,7 +10,7 @@ **参数:** - **num_true** (int) - 每个训练样本的目标类数。 - - **num_sampled** (int) - 随机采样的类数。sampled_candidates的shape将为 `num_sampled` 。如果`unique` 为True,则 `num_sampled` 必须小于或等于 `range_max` 。 + - **num_sampled** (int) - 随机采样的类数。sampled_candidates的shape将为 `num_sampled` 。如果 `unique` 为True,则 `num_sampled` 必须小于或等于 `range_max` 。 - **unique** (bool) - 表示一个batch中的所有采样类是否唯一。 - **range_max** (int) - 可能的类数,该值必须是非负的。 - **seed** (int) - 随机种子,该值必须是非负的。如果seed的值为0,则seed的值将被随机生成的值替换。默认值:0。 diff --git a/mindspore/python/mindspore/mindrecord/tools/tfrecord_to_mr.py b/mindspore/python/mindspore/mindrecord/tools/tfrecord_to_mr.py index 98f17b995c..6245bb2609 100644 --- a/mindspore/python/mindspore/mindrecord/tools/tfrecord_to_mr.py +++ b/mindspore/python/mindspore/mindrecord/tools/tfrecord_to_mr.py @@ -75,7 +75,7 @@ class TFRecordToMR: source (str): TFRecord file to be transformed. destination (str): MindRecord file path to transform into, ensure that no file with the same name exists in the directory. - feature_dict (dict[str, `FixedLenFeature `_]): Dictionary + feature_dict (dict[str, `FixedLenFeature `_ ]): Dictionary that states the feature type, and `VarLenFeature `_ is not supported. bytes_fields (list[str], optional): The bytes fields which are in `feature_dict` and can be images bytes. diff --git a/mindspore/python/mindspore/nn/optim/thor.py b/mindspore/python/mindspore/nn/optim/thor.py index 47747321c6..8616ffcb38 100644 --- a/mindspore/python/mindspore/nn/optim/thor.py +++ b/mindspore/python/mindspore/nn/optim/thor.py @@ -273,7 +273,7 @@ def thor(net, learning_rate, damping, momentum, weight_decay=0.0, loss_scale=1.0 :math:`\lambda` represents :math:`damping`, :math:`g_i` represents gradients of the i-th layer, :math:`\otimes` represents Kronecker product, :math:`\gamma` represents 'learning rate' - Note: + Note: When a parameter group is separated, 'weight_decay' of each group is applied to the corresponding parameter. 'weight_decay' in the optimizer is applied to arguments that do not have 'beta' or 'gamma' in their name when the argument group is not separated. diff --git a/mindspore/python/mindspore/ops/function/array_func.py b/mindspore/python/mindspore/ops/function/array_func.py index 8be1cde27a..b79ef659b8 100644 --- a/mindspore/python/mindspore/ops/function/array_func.py +++ b/mindspore/python/mindspore/ops/function/array_func.py @@ -46,7 +46,7 @@ def unique(x): The shape is :math:`(N,*)` where :math:`*` means, any number of additional dimensions. Returns: - Tuple, containing Tensor objects `(y, idx), `y` is a tensor with the + Tuple, containing Tensor objects (`y`, `idx`), `y` is a tensor with the same type as `x`, and contains the unique elements in `x`. `idx` is a tensor containing indices of elements in the input corresponding to the output tensor, have the same shape with `x`.