!42400 fix error links for master

Merge pull request !42400 from lvmingfu/code_docs_master0920
This commit is contained in:
i-robot 2022-09-20 06:44:59 +00:00 committed by Gitee
commit 409d19f9ca
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 6 deletions

View File

@ -3,11 +3,11 @@ mindspore.dataset.WaitedDSCallback
.. py:class:: mindspore.dataset.WaitedDSCallback(step_size=1)
阻塞式数据处理回调类的抽象基类,用于与训练回调类 `mindspore.Callback <https://www.mindspore.cn/docs/zh-CN/master/api_python/mindspore/mindspore.Callback.html#mindspore.Callback>`_ 的同步。
阻塞式数据处理回调类的抽象基类,用于与训练回调类 `mindspore.train.Callback <https://www.mindspore.cn/docs/zh-CN/master/api_python/train/mindspore.train.Callback.html#mindspore.train.Callback>`_ 的同步。
可用于在step或epoch开始前执行自定义的回调方法例如在自动数据增强中根据上一个epoch的loss值来更新增强算子参数配置。
用户可通过 `train_run_context` 获取网络训练相关信息,如 `network` 、 `train_network` 、 `epoch_num` 、 `batch_num` 、 `loss_fn` 、 `optimizer` 、 `parallel_mode` 、 `device_number` 、 `list_callback` 、 `cur_epoch_num` 、 `cur_step_num` 、 `dataset_sink_mode` 、 `net_outputs` 等,详见 `mindspore.Callback <https://www.mindspore.cn/docs/zh-CN/master/api_python/mindspore/mindspore.Callback.html#mindspore.Callback>`_
用户可通过 `train_run_context` 获取网络训练相关信息,如 `network` 、 `train_network` 、 `epoch_num` 、 `batch_num` 、 `loss_fn` 、 `optimizer` 、 `parallel_mode` 、 `device_number` 、 `list_callback` 、 `cur_epoch_num` 、 `cur_step_num` 、 `dataset_sink_mode` 、 `net_outputs` 等,详见 `mindspore.train.Callback <https://www.mindspore.cn/docs/zh-CN/master/api_python/train/mindspore.train.Callback.html#mindspore.train.Callback>`_
用户可通过 `ds_run_context` 获取数据处理管道相关信息,包括 `cur_epoch_num` (当前epoch数)、 `cur_step_num_in_epoch` (当前epoch的step数)、 `cur_step_num` (当前step数)。

View File

@ -130,8 +130,8 @@ class DSCallback:
class WaitedDSCallback(Callback, DSCallback):
r"""
Abstract base class used to build dataset callback classes that are synchronized with the training callback class
`mindspore.Callback \
<https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.Callback.html#mindspore.Callback>`_.
`mindspore.train.Callback \
<https://www.mindspore.cn/docs/en/master/api_python/train/mindspore.train.Callback.html#mindspore.train.Callback>`_.
It can be used to execute a custom callback method before a step or an epoch, such as
updating the parameters of operators according to the loss of the previous training epoch in auto augmentation.
@ -140,8 +140,8 @@ class WaitedDSCallback(Callback, DSCallback):
`network`, `train_network`, `epoch_num`, `batch_num`, `loss_fn`, `optimizer`, `parallel_mode`,
`device_number`, `list_callback`, `cur_epoch_num`, `cur_step_num`, `dataset_sink_mode`,
`net_outputs`, etc., see
`mindspore.Callback \
<https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.Callback.html#mindspore.Callback>`_.
`mindspore.train.Callback \
<https://www.mindspore.cn/docs/en/master/api_python/train/mindspore.train.Callback.html#mindspore.train.Callback>`_.
Users can obtain the dataset pipeline context through `ds_run_context`, including
`cur_epoch_num`, `cur_step_num_in_epoch` and `cur_step_num`.