forked from mindspore-Ecosystem/mindspore
modify doc
This commit is contained in:
parent
46a614d37a
commit
62742ebcec
|
@ -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::
|
||||
|
||||
|
|
|
@ -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。
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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…
Reference in New Issue