Browse Source

!32478 modify doc

Merge pull request !32478 from xumengjuan1/code_docs_x18
pull/1/head
i-robot Gitee 4 years ago
parent
commit
fc85afd0bb
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 6 additions and 6 deletions
  1. +2
    -2
      docs/api/api_python/mindspore.boost.rst
  2. +1
    -1
      docs/api/api_python/ops/mindspore.ops.UniformCandidateSampler.rst
  3. +1
    -1
      mindspore/python/mindspore/mindrecord/tools/tfrecord_to_mr.py
  4. +1
    -1
      mindspore/python/mindspore/nn/optim/thor.py
  5. +1
    -1
      mindspore/python/mindspore/ops/function/array_func.py

+ 2
- 2
docs/api/api_python/mindspore.boost.rst View File

@@ -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::



+ 1
- 1
docs/api/api_python/ops/mindspore.ops.UniformCandidateSampler.rst View File

@@ -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。


+ 1
- 1
mindspore/python/mindspore/mindrecord/tools/tfrecord_to_mr.py View File

@@ -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 <https://www.tensorflow.org/api_docs/python/tf/io/FixedLenFeature>`_]): Dictionary
feature_dict (dict[str, `FixedLenFeature <https://www.tensorflow.org/api_docs/python/tf/io/FixedLenFeature>`_ ]): Dictionary
that states the feature type, and `VarLenFeature <https://www.tensorflow.org/api_docs/python/tf/io/VarLenFeature>`_
is not supported.
bytes_fields (list[str], optional): The bytes fields which are in `feature_dict` and can be images bytes.


+ 1
- 1
mindspore/python/mindspore/nn/optim/thor.py View File

@@ -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.


+ 1
- 1
mindspore/python/mindspore/ops/function/array_func.py View File

@@ -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`.


Loading…
Cancel
Save