From 60e91cc0e9a420387000c828e4d8aae430e45a55 Mon Sep 17 00:00:00 2001 From: zhangyi Date: Wed, 9 Mar 2022 19:15:39 +0800 Subject: [PATCH] title translation in 1.6: --- .../docs/source_en/full_training_of_gcn.md | 6 +- .../mindspore_graphlearning_install.md | 6 +- .../docs/source_zh_cn/full_training_of_GCN.md | 6 +- .../mindspore_graphlearning_install.md | 6 +- docs/hub/docs/source_en/publish_model.md | 2 +- docs/hub/docs/source_zh_cn/publish_model.md | 2 +- .../quick_start/image_segmentation.md | 2 +- .../docs/source_en/quick_start/quick_start.md | 2 +- .../quick_start/image_segmentation.md | 2 +- .../source_zh_cn/quick_start/quick_start.md | 2 +- .../faq/source_en/data_processing.md | 4 +- .../mindspore/faq/source_en/feature_advice.md | 2 +- .../faq/source_en/implement_problem.md | 2 +- .../faq/source_zh_cn/data_processing.md | 4 +- .../faq/source_zh_cn/feature_advice.md | 2 +- .../faq/source_zh_cn/implement_problem.md | 2 +- .../migration_guide/source_en/sample_code.md | 2 +- .../source_zh_cn/sample_code.md | 2 +- .../training_process_comparision.md | 2 +- .../note/source_en/network_list_ms.md | 2 +- .../note/source_zh_cn/network_list_ms.md | 2 +- .../source_en/apply_gradient_accumulation.md | 6 +- .../apply_parameter_server_training.md | 2 +- .../source_en/cv_resnet50.md | 2 +- .../cv_resnet50_second_order_optimizer.md | 2 +- .../source_en/dump_in_graph_mode.md | 2 +- .../source_en/enable_dataset_autotune.md | 2 +- .../source_en/load_dataset_networks.md | 62 +++++++++---------- .../source_en/multi_platform_inference_gpu.md | 2 +- .../source_en/nlp_sentimentnet.md | 6 +- .../source_en/online_inference.md | 2 +- .../source_zh_cn/apply_adaptive_summation.md | 4 +- .../apply_dimention_reduce_training.md | 8 +-- .../apply_gradient_accumulation.md | 10 +-- .../apply_parameter_server_training.md | 2 +- .../source_zh_cn/cv_resnet50.md | 2 +- .../cv_resnet50_second_order_optimizer.md | 2 +- .../source_zh_cn/dump_in_graph_mode.md | 2 +- .../source_zh_cn/enable_dataset_autotune.md | 2 +- .../source_zh_cn/load_dataset_networks.md | 62 +++++++++---------- .../multi_platform_inference_gpu.md | 2 +- .../source_zh_cn/nlp_sentimentnet.md | 6 +- .../source_zh_cn/online_inference.md | 2 +- .../apply_parameter_server_training.md | 2 +- .../image_and_video/transfer_learning.md | 2 +- .../ascend910_and_gpu_inference.ipynb | 2 +- .../inference/mindspore_lite_inference.md | 2 +- 47 files changed, 131 insertions(+), 131 deletions(-) diff --git a/docs/graphlearning/docs/source_en/full_training_of_gcn.md b/docs/graphlearning/docs/source_en/full_training_of_gcn.md index da324af07d..29cea8e41f 100644 --- a/docs/graphlearning/docs/source_en/full_training_of_gcn.md +++ b/docs/graphlearning/docs/source_en/full_training_of_gcn.md @@ -15,7 +15,7 @@ MindSpore Graph Learning provides abundant dataset read, graph operation, and ne In addition, MindSpore Graph Learning provides a point-centric GNN programming paradigm. Its built-in code parsing functions translate point-centric computing expressions into graph data computing operations. To facilitate debugging, a translation comparison between the user input code and the calculation code is printed during the parsing process. This document describes how to use MindSpore Graph Learning to train and verify GCN. If graph nodes and edge features can be stored in a GPU, you do not need to sample the entire graph for training. -For details about the code, see . +For details about the code, see . The following is an example of graph training using GCN: @@ -54,7 +54,7 @@ class GCNNet(GNNCell): GCNNet is inherited from GNNCell. The last input of the construct function in GNNCell must be a graph or BatchedGraph, that is, the graph structure class supported by MindSpore Graph Learning. In addition, you must import mindspore at the header of the file to identify the execution backend when the code is translated. In GCNConv, data_feat_size indicates the feature dimension of the input node, hidden_dim_size indicates the feature dimension of the hidden layer, n_classes indicates the dimension of the output classification, and in_deg and out_deg indicate the indegree and outdegree of the node in the graph data, respectively. -For details about GCN implementation, see the API code of mindspore_gl.nn.GCNConv: . +For details about GCN implementation, see the API code of mindspore_gl.nn.GCNConv: . ## Defining a Loss Function @@ -234,4 +234,4 @@ Epoch 200, Train loss 0.27628058, Test acc 0.819 Accuracy verified on CORA: 0.82 (thesis: 0.815) -The preceding is the usage guide of the entire graph training. For more examples, see [examples directory](). \ No newline at end of file +The preceding is the usage guide of the entire graph training. For more examples, see [examples directory](). \ No newline at end of file diff --git a/docs/graphlearning/docs/source_en/mindspore_graphlearning_install.md b/docs/graphlearning/docs/source_en/mindspore_graphlearning_install.md index e33793c8ad..4d4ff4a577 100644 --- a/docs/graphlearning/docs/source_en/mindspore_graphlearning_install.md +++ b/docs/graphlearning/docs/source_en/mindspore_graphlearning_install.md @@ -1,4 +1,4 @@ -# MindSpore Graph Learning +# Install Graph Learning - [Installation](#installation) - [System Environment Information Confirmation](#system-environment-information-confirmation) @@ -15,7 +15,7 @@ - Ensure that the hardware platform is GPU under the Linux system. - Refer to [MindSpore Installation Guide](https://www.mindspore.cn/install/en) to complete the installation of MindSpore, which requires at least version 1.6.0. -- For other dependencies, please refer to [requirements.txt](https://gitee.com/mindspore/graphlearning/blob/r0.5/requirements.txt). +- For other dependencies, please refer to [requirements.txt](https://gitee.com/mindspore/graphlearning/blob/r0.1/requirements.txt). ### Installation Methods @@ -27,7 +27,7 @@ You can install MindSpore Graph Learning either by pip or by source code. pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/{version}/GraphLearning/any/mindspore_gl_gpu-{version}-cp37-cp37m-linux_x86_64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -> - When the network is connected, dependency items are automatically downloaded during .whl package installation. For details about other dependency items, see [requirements.txt](https://gitee.com/mindspore/graphlearning/blob/r0.5/requirements.txt). In other cases, you need to manually install dependency items. +> - When the network is connected, dependency items are automatically downloaded during .whl package installation. For details about other dependency items, see [requirements.txt](https://gitee.com/mindspore/graphlearning/blob/r0.1/requirements.txt). In other cases, you need to manually install dependency items. > - `{version}` denotes the version of MindSpore Graph Learning. For example, when you are downloading MindSpore Graph Learning 0.1, `{version}` should be 0.1. #### Installation by Source Code diff --git a/docs/graphlearning/docs/source_zh_cn/full_training_of_GCN.md b/docs/graphlearning/docs/source_zh_cn/full_training_of_GCN.md index acf9b313fe..160011d8b0 100644 --- a/docs/graphlearning/docs/source_zh_cn/full_training_of_GCN.md +++ b/docs/graphlearning/docs/source_zh_cn/full_training_of_GCN.md @@ -15,7 +15,7 @@ MindSpore Graph Learning为用户提供了丰富的数据读入、图操作和 此外MindSpore Graph Learning提供了以点为中心的GNN网络编程范式,内置将以点为中心的计算表达翻译为图数据的计算操作的代码解析函数,为了方便用户调试解析过程将打印出用户输入代码与计算代码的翻译对比图。 本文档展示了使用MindSpore Graph Learning训练GCN网络以及验证。当用户的图节点和边特征都能存入GPU时,可以不用采样进行整图训练。 -具体代码参见。 +具体代码参见。 下面为GCN整图训练的示范: @@ -54,7 +54,7 @@ class GCNNet(GNNCell): 其中定义的GCNNet继承于GNNCell。GNNCell中construct函数的最后一项输入必须为Graph或者BatchedGraph,也就是MindSpore Graph Learning内置支持的图结构类。此外必须在文件的头部导入 mindspore便于代码翻译时识别执行后端。 GCNConv的参数data_feat_size为输入节点特征维度,hidden_dim_size为隐层特征维度,n_classes为输出分类的维度,in_deg和out_deg分别为图数据中节点的入度和出度。 -具体GCN的实现可以参考mindspore_gl.nn.GCNConv的接口代码。 +具体GCN的实现可以参考mindspore_gl.nn.GCNConv的接口代码。 ## 定义loss函数 @@ -234,4 +234,4 @@ Epoch 200, Train loss 0.27628058, Test acc 0.819 在cora上验证精度:0.82 (论文:0.815) -以上就是整图训练的使用指南。更多样例可参考[examples目录]()。 \ No newline at end of file +以上就是整图训练的使用指南。更多样例可参考[examples目录]()。 \ No newline at end of file diff --git a/docs/graphlearning/docs/source_zh_cn/mindspore_graphlearning_install.md b/docs/graphlearning/docs/source_zh_cn/mindspore_graphlearning_install.md index f8c7ffe509..41189158d0 100644 --- a/docs/graphlearning/docs/source_zh_cn/mindspore_graphlearning_install.md +++ b/docs/graphlearning/docs/source_zh_cn/mindspore_graphlearning_install.md @@ -1,4 +1,4 @@ -# MindSpore Graph Learning +# 安装 Graph Learning - [安装教程](#安装教程) - [确认系统环境信息](#确认系统环境信息) @@ -19,7 +19,7 @@ - 硬件平台确认为Linux系统下的GPU。 - 参考[MindSpore安装指南](https://www.mindspore.cn/install),完成MindSpore的安装,要求至少1.6.0版本。 -- 其余依赖请参见[requirements.txt](https://gitee.com/mindspore/graphlearning/blob/r0.5/requirements.txt)。 +- 其余依赖请参见[requirements.txt](https://gitee.com/mindspore/graphlearning/blob/r0.1/requirements.txt)。 ### 安装方式 @@ -31,7 +31,7 @@ pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/{version}/GraphLearning/any/mindspore_gl_gpu-{version}-cp37-cp37m-linux_x86_64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -> - 在联网状态下,安装whl包时会自动下载MindSpore Graph Learning安装包的依赖项(依赖项详情参见[requirements.txt](https://gitee.com/mindspore/graphlearning/blob/r0.5/requirements.txt)),其余情况需自行安装。 +> - 在联网状态下,安装whl包时会自动下载MindSpore Graph Learning安装包的依赖项(依赖项详情参见[requirements.txt](https://gitee.com/mindspore/graphlearning/blob/r0.1/requirements.txt)),其余情况需自行安装。 > - `{version}`表示MindSpore Graph Learning版本号,例如下载0.1版本MindSpore Graph Learning时,`{version}`应写为0.1。 #### 源码安装 diff --git a/docs/hub/docs/source_en/publish_model.md b/docs/hub/docs/source_en/publish_model.md index 0497f07036..c3b06addcc 100644 --- a/docs/hub/docs/source_en/publish_model.md +++ b/docs/hub/docs/source_en/publish_model.md @@ -14,7 +14,7 @@ You can publish models to MindSpore Hub via PR in [hub](https://gitee.com/mindsp 1. Host your pre-trained model in a storage location where we are able to access. -2. Add a model generation python file called `mindspore_hub_conf.py` in your own repo using this [template](https://gitee.com/mindspore/models/blob/master/official/cv/googlenet/mindspore_hub_conf.py). The location of the `mindspore_hub_conf.py` file is shown below: +2. Add a model generation python file called `mindspore_hub_conf.py` in your own repo using this [template](https://gitee.com/mindspore/models/blob/r1.6/official/cv/googlenet/mindspore_hub_conf.py). The location of the `mindspore_hub_conf.py` file is shown below: ```text googlenet diff --git a/docs/hub/docs/source_zh_cn/publish_model.md b/docs/hub/docs/source_zh_cn/publish_model.md index 24a24b032e..09b0c4b906 100644 --- a/docs/hub/docs/source_zh_cn/publish_model.md +++ b/docs/hub/docs/source_zh_cn/publish_model.md @@ -14,7 +14,7 @@ 1. 将你的预训练模型托管在可以访问的存储位置。 -2. 参照[模板](https://gitee.com/mindspore/models/blob/master/official/cv/googlenet/mindspore_hub_conf.py),在你自己的代码仓中添加模型生成文件`mindspore_hub_conf.py`,文件放置的位置如下: +2. 参照[模板](https://gitee.com/mindspore/models/blob/r1.6/official/cv/googlenet/mindspore_hub_conf.py),在你自己的代码仓中添加模型生成文件`mindspore_hub_conf.py`,文件放置的位置如下: ```text googlenet diff --git a/docs/lite/docs/source_en/quick_start/image_segmentation.md b/docs/lite/docs/source_en/quick_start/image_segmentation.md index ec1f99c8c6..accf04ebaa 100644 --- a/docs/lite/docs/source_en/quick_start/image_segmentation.md +++ b/docs/lite/docs/source_en/quick_start/image_segmentation.md @@ -117,7 +117,7 @@ Note: If the download fails, manually download the model file [segment_model.ms] ### Writing On-Device Inference Code -The inference code and process are as follows. For details about the complete code, see [src/java/com/mindspore/imagesegmentation/TrackingMobile](https://gitee.com/mindspore/models/blob/master/official/lite/image_segmentation/app/src/main/java/com/mindspore/imagesegmentation/help/TrackingMobile.java). +The inference code and process are as follows. For details about the complete code, see [src/java/com/mindspore/imagesegmentation/TrackingMobile](https://gitee.com/mindspore/models/blob/r1.6/official/lite/image_segmentation/app/src/main/java/com/mindspore/imagesegmentation/help/TrackingMobile.java). 1. Load the MindSpore Lite model file and build the context, model, and computational graph for inference. diff --git a/docs/lite/docs/source_en/quick_start/quick_start.md b/docs/lite/docs/source_en/quick_start/quick_start.md index 895b83089d..c8d4851b63 100644 --- a/docs/lite/docs/source_en/quick_start/quick_start.md +++ b/docs/lite/docs/source_en/quick_start/quick_start.md @@ -206,7 +206,7 @@ Note: if the automatic download fails, please manually download the relevant lib Call MindSpore Lite C++ APIs at the JNI layer to implement on-device inference. -The inference process code is as follows. For details about the complete code, see [MindSporeNetnative.cpp](https://gitee.com/mindspore/models/blob/master/official/lite/image_classification/app/src/main/cpp/MindSporeNetnative.cpp). +The inference process code is as follows. For details about the complete code, see [MindSporeNetnative.cpp](https://gitee.com/mindspore/models/blob/r1.6/official/lite/image_classification/app/src/main/cpp/MindSporeNetnative.cpp). 1. Load the MindSpore Lite model file and build the context, model, and computational graph for inference. diff --git a/docs/lite/docs/source_zh_cn/quick_start/image_segmentation.md b/docs/lite/docs/source_zh_cn/quick_start/image_segmentation.md index 5954565592..4e51e85ab9 100644 --- a/docs/lite/docs/source_zh_cn/quick_start/image_segmentation.md +++ b/docs/lite/docs/source_zh_cn/quick_start/image_segmentation.md @@ -117,7 +117,7 @@ Android调用MindSpore Android AAR时,需要相关库文件支持。可通过M ### 编写端侧推理代码 -推理代码流程如下,完整代码请参见 [src/java/com/mindspore/imagesegmentation/TrackingMobile](https://gitee.com/mindspore/models/blob/master/official/lite/image_segmentation/app/src/main/java/com/mindspore/imagesegmentation/help/TrackingMobile.java)。 +推理代码流程如下,完整代码请参见 [src/java/com/mindspore/imagesegmentation/TrackingMobile](https://gitee.com/mindspore/models/blob/r1.6/official/lite/image_segmentation/app/src/main/java/com/mindspore/imagesegmentation/help/TrackingMobile.java)。 1. 加载MindSpore Lite模型,构建上下文、会话以及用于推理的计算图。 diff --git a/docs/lite/docs/source_zh_cn/quick_start/quick_start.md b/docs/lite/docs/source_zh_cn/quick_start/quick_start.md index 62f8fb5e41..414c3b9596 100644 --- a/docs/lite/docs/source_zh_cn/quick_start/quick_start.md +++ b/docs/lite/docs/source_zh_cn/quick_start/quick_start.md @@ -210,7 +210,7 @@ target_link_libraries( # Specifies the target library. 在JNI层调用MindSpore Lite C++ API实现端侧推理。 -推理代码流程如下,完整代码请参见[MindSporeNetnative.cpp](https://gitee.com/mindspore/models/blob/master/official/lite/image_classification/app/src/main/cpp/MindSporeNetnative.cpp)。 +推理代码流程如下,完整代码请参见[MindSporeNetnative.cpp](https://gitee.com/mindspore/models/blob/r1.6/official/lite/image_classification/app/src/main/cpp/MindSporeNetnative.cpp)。 1. 加载MindSpore Lite模型文件,构建上下文、会话以及用于推理的计算图。 diff --git a/docs/mindspore/faq/source_en/data_processing.md b/docs/mindspore/faq/source_en/data_processing.md index a760d5ccc7..9e6e209d82 100644 --- a/docs/mindspore/faq/source_en/data_processing.md +++ b/docs/mindspore/faq/source_en/data_processing.md @@ -122,13 +122,13 @@ When `dataset_sink_mode` is set to `False`, data processing and network computin **Q: Can MindSpore train image data of different sizes by batch?** -A: You can refer to the usage of YOLOv3 which contains the resizing of different images. For details about the script, see [yolo_dataset](https://gitee.com/mindspore/models/blob/master/official/cv/yolov3_darknet53/src/yolo_dataset.py). +A: You can refer to the usage of YOLOv3 which contains the resizing of different images. For details about the script, see [yolo_dataset](https://gitee.com/mindspore/models/blob/r1.6/official/cv/yolov3_darknet53/src/yolo_dataset.py).
**Q: Must data be converted into MindRecords when MindSpore is used for segmentation training?** -A: [build_seg_data.py](https://gitee.com/mindspore/models/blob/master/official/cv/deeplabv3/src/data/build_seg_data.py) is used to generate MindRecords based on a dataset. You can directly use or adapt it to your dataset. Alternatively, you can use `GeneratorDataset` if you want to read the dataset by yourself. +A: [build_seg_data.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/deeplabv3/src/data/build_seg_data.py) is used to generate MindRecords based on a dataset. You can directly use or adapt it to your dataset. Alternatively, you can use `GeneratorDataset` if you want to read the dataset by yourself. [GenratorDataset example](https://www.mindspore.cn/docs/programming_guide/en/r1.6/dataset_loading.html#loading-user-defined-dataset) diff --git a/docs/mindspore/faq/source_en/feature_advice.md b/docs/mindspore/faq/source_en/feature_advice.md index c6a11df9ee..fd55a54db3 100644 --- a/docs/mindspore/faq/source_en/feature_advice.md +++ b/docs/mindspore/faq/source_en/feature_advice.md @@ -90,7 +90,7 @@ A: MindSpore supports Python native expression via `import mindspore`. **Q: Does MindSpore support truncated gradient?** -A: Yes. For details, see [Definition and Usage of Truncated Gradient](https://gitee.com/mindspore/models/blob/master/official/nlp/transformer/src/transformer_for_train.py#L35). +A: Yes. For details, see [Definition and Usage of Truncated Gradient](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/transformer/src/transformer_for_train.py#L35).
diff --git a/docs/mindspore/faq/source_en/implement_problem.md b/docs/mindspore/faq/source_en/implement_problem.md index 62afbfd867..3106245ee3 100644 --- a/docs/mindspore/faq/source_en/implement_problem.md +++ b/docs/mindspore/faq/source_en/implement_problem.md @@ -94,7 +94,7 @@ def count_params(net): return total_params ``` -[Script Link](https://gitee.com/mindspore/models/blob/master/research/cv/tinynet/src/utils.py). +[Script Link](https://gitee.com/mindspore/models/blob/r1.6/research/cv/tinynet/src/utils.py).
diff --git a/docs/mindspore/faq/source_zh_cn/data_processing.md b/docs/mindspore/faq/source_zh_cn/data_processing.md index 8aeff2ddf9..f0727d115d 100644 --- a/docs/mindspore/faq/source_zh_cn/data_processing.md +++ b/docs/mindspore/faq/source_zh_cn/data_processing.md @@ -122,13 +122,13 @@ A: 当`dataset_sink_mode=True`时,数据处理会和网络计算构成Pipeline **Q: MindSpore能否支持按批次对不同尺寸的图片数据进行训练?** -A: 你可以参考yolov3对于此场景的使用,里面有对于图像的不同缩放,脚本见[yolo_dataset](https://gitee.com/mindspore/models/blob/master/official/cv/yolov3_darknet53/src/yolo_dataset.py)。 +A: 你可以参考yolov3对于此场景的使用,里面有对于图像的不同缩放,脚本见[yolo_dataset](https://gitee.com/mindspore/models/blob/r1.6/official/cv/yolov3_darknet53/src/yolo_dataset.py)。
**Q: 使用MindSpore做分割训练,必须将数据转为MindRecord吗?** -A: [build_seg_data.py](https://gitee.com/mindspore/models/blob/master/official/cv/deeplabv3/src/data/build_seg_data.py)是将数据集生成MindRecord的脚本,可以直接使用/适配下你的数据集。或者如果你想尝试自己实现数据集的读取,可以使用`GeneratorDataset`自定义数据集加载。 +A: [build_seg_data.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/deeplabv3/src/data/build_seg_data.py)是将数据集生成MindRecord的脚本,可以直接使用/适配下你的数据集。或者如果你想尝试自己实现数据集的读取,可以使用`GeneratorDataset`自定义数据集加载。 [GenratorDataset 示例](https://www.mindspore.cn/docs/programming_guide/zh-CN/r1.6/dataset_loading.html#id5) diff --git a/docs/mindspore/faq/source_zh_cn/feature_advice.md b/docs/mindspore/faq/source_zh_cn/feature_advice.md index 9f167c75c8..1d4bdb77e9 100644 --- a/docs/mindspore/faq/source_zh_cn/feature_advice.md +++ b/docs/mindspore/faq/source_zh_cn/feature_advice.md @@ -102,7 +102,7 @@ A: MindSpore支持Python原生表达,`import mindspore`相关包即可使用 **Q: 请问MindSpore支持梯度截断吗?** -A: 支持,可以参考[梯度截断的定义和使用](https://gitee.com/mindspore/models/blob/master/official/nlp/transformer/src/transformer_for_train.py#L35)。 +A: 支持,可以参考[梯度截断的定义和使用](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/transformer/src/transformer_for_train.py#L35)。
diff --git a/docs/mindspore/faq/source_zh_cn/implement_problem.md b/docs/mindspore/faq/source_zh_cn/implement_problem.md index ea55b6d93c..ee2fcda67e 100644 --- a/docs/mindspore/faq/source_zh_cn/implement_problem.md +++ b/docs/mindspore/faq/source_zh_cn/implement_problem.md @@ -94,7 +94,7 @@ def count_params(net): return total_params ``` -具体[脚本链接](https://gitee.com/mindspore/models/blob/master/research/cv/tinynet/src/utils.py)。 +具体[脚本链接](https://gitee.com/mindspore/models/blob/r1.6/research/cv/tinynet/src/utils.py)。
diff --git a/docs/mindspore/migration_guide/source_en/sample_code.md b/docs/mindspore/migration_guide/source_en/sample_code.md index 54234c7934..6256b4f014 100644 --- a/docs/mindspore/migration_guide/source_en/sample_code.md +++ b/docs/mindspore/migration_guide/source_en/sample_code.md @@ -865,7 +865,7 @@ When the data processing speed is slow, the queue is gradually depleted from the When distributed training is performed, after the forward propagation and gradient computation are completed during a Step, each machine starts to synchronize the AllReduce gradient, and the AllReduce synchronization time is mainly affected by the number of weights and machines. Normally, AllReduce gradient synchronization waits until all the inverse operators are finished, i.e., all the gradients of all weights are computed before synchronizing the gradients of all machines at once, but with AllReduce tangent, we can synchronize the gradients of some weights as soon as they are computed, so that the gradient synchronization and the gradient computation of the remaining operators can be This way, the gradient synchronization and the gradient computation of the remaining operators can be performed in parallel, hiding this part of the AllReduce gradient synchronization time. The slicing strategy is usually a manual attempt to find an optimal solution (supporting slicing greater than two segments). -As an example, [ResNet50 network](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/train.py) has 160 weights and [85, 160] means that the gradient synchronization is performed immediately after the gradient is calculated for the 0th to 85th weights, and the gradient synchronization is performed after the gradient is calculated for the 86th to 160th weights. The code implementation is as follows: +As an example, [ResNet50 network](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/train.py) has 160 weights and [85, 160] means that the gradient synchronization is performed immediately after the gradient is calculated for the 0th to 85th weights, and the gradient synchronization is performed after the gradient is calculated for the 86th to 160th weights. The code implementation is as follows: ```python device_id = int(os.getenv('DEVICE_ID', '0')) diff --git a/docs/mindspore/migration_guide/source_zh_cn/sample_code.md b/docs/mindspore/migration_guide/source_zh_cn/sample_code.md index 68169f5dbf..2266fc91e4 100644 --- a/docs/mindspore/migration_guide/source_zh_cn/sample_code.md +++ b/docs/mindspore/migration_guide/source_zh_cn/sample_code.md @@ -830,7 +830,7 @@ profiler.analyse() 当进行分布式训练时,在一个Step的训练过程中,完成前向传播和梯度计算后,各个机器开始进行AllReduce梯度同步,AllReduce同步时间主要受权重数量、机器数量影响,对于越复杂、机器规模越大的网络,其 AllReduce 梯度更新时间也越久,此时我们可以进行AllReduce 切分来优化这部分耗时。 正常情况下,AllReduce 梯度同步会等所有反向算子执行结束,也就是对所有权重都计算出梯度后再一次性同步所有机器的梯度,而使用AllReduce切分后,我们可以在计算出一部分权重的梯度后,就立刻进行这部分权重的梯度同步,这样梯度同步和剩余算子的梯度计算可以并行执行,也就隐藏了这部分 AllReduce 梯度同步时间。切分策略通常是手动尝试,寻找一个最优的方案(支持切分大于两段)。 -以 [ResNet50网络](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/train.py) 为例,该网络共有 160 个 权重, [85, 160] 表示第 0 至 85个权重计算完梯度后立刻进行梯度同步,第 86 至 160 个 权重计算完后再进行梯度同步,这里共切分两段,因此需要进行两次梯度同步。代码实现如下: +以 [ResNet50网络](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/train.py) 为例,该网络共有 160 个 权重, [85, 160] 表示第 0 至 85个权重计算完梯度后立刻进行梯度同步,第 86 至 160 个 权重计算完后再进行梯度同步,这里共切分两段,因此需要进行两次梯度同步。代码实现如下: ```python device_id = int(os.getenv('DEVICE_ID', '0')) diff --git a/docs/mindspore/migration_guide/source_zh_cn/training_process_comparision.md b/docs/mindspore/migration_guide/source_zh_cn/training_process_comparision.md index ef828c77f7..60ccdaf621 100644 --- a/docs/mindspore/migration_guide/source_zh_cn/training_process_comparision.md +++ b/docs/mindspore/migration_guide/source_zh_cn/training_process_comparision.md @@ -46,7 +46,7 @@ MindSpore 的模型训练和推理的总体执行流程,基本与主流的 AI model.train(epoch_size, ds_train, callbacks=[loss_cb, ckpoint_cb ]) ``` - 代码来源: [ModelZoo/LeNet5](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/train.py) + 代码来源: [ModelZoo/LeNet5](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/train.py) - PyTorch diff --git a/docs/mindspore/note/source_en/network_list_ms.md b/docs/mindspore/note/source_en/network_list_ms.md index e1aa8d06e5..8abcf1d654 100644 --- a/docs/mindspore/note/source_en/network_list_ms.md +++ b/docs/mindspore/note/source_en/network_list_ms.md @@ -2,6 +2,6 @@ -Please obtain the [Network List](https://gitee.com/mindspore/models/blob/master/README.md#table-of-contents) from ModelZoo. +Please obtain the [Network List](https://gitee.com/mindspore/models/blob/r1.6/README.md#table-of-contents) from ModelZoo. You can also use [MindWizard Tool](https://gitee.com/mindspore/mindinsight/tree/r1.6/mindinsight/wizard/) to quickly generate classic network scripts. diff --git a/docs/mindspore/note/source_zh_cn/network_list_ms.md b/docs/mindspore/note/source_zh_cn/network_list_ms.md index c1d6626255..480c25e2ca 100644 --- a/docs/mindspore/note/source_zh_cn/network_list_ms.md +++ b/docs/mindspore/note/source_zh_cn/network_list_ms.md @@ -2,6 +2,6 @@ -请从ModelZoo获取[MindSpore网络支持列表](https://gitee.com/mindspore/models/blob/master/README_CN.md#%E7%9B%AE%E5%BD%95)。 +请从ModelZoo获取[MindSpore网络支持列表](https://gitee.com/mindspore/models/blob/r1.6/README_CN.md#%E7%9B%AE%E5%BD%95)。 你也可以使用 [MindWizard工具](https://gitee.com/mindspore/mindinsight/tree/r1.6/mindinsight/wizard/) 快速生成经典网络脚本。 diff --git a/docs/mindspore/programming_guide/source_en/apply_gradient_accumulation.md b/docs/mindspore/programming_guide/source_en/apply_gradient_accumulation.md index 16e0897eee..d6bcaf9846 100644 --- a/docs/mindspore/programming_guide/source_en/apply_gradient_accumulation.md +++ b/docs/mindspore/programming_guide/source_en/apply_gradient_accumulation.md @@ -55,11 +55,11 @@ from models.official.cv.lenet.src.lenet import LeNet5 ### Loading the Dataset -Use the `MnistDataset` API provided by `dataset` of MindSpore to load the MNIST dataset. The code is imported from [dataset.py]() in the `lenet` directory of `models`. +Use the `MnistDataset` API provided by `dataset` of MindSpore to load the MNIST dataset. The code is imported from [dataset.py]() in the `lenet` directory of `models`. ### Defining the Network -LeNet is used as an example network. You can also use other networks, such as ResNet-50 and BERT. The code is imported from [lenet.py]() in the `lenet` directory of `models`. +LeNet is used as an example network. You can also use other networks, such as ResNet-50 and BERT. The code is imported from [lenet.py]() in the `lenet` directory of `models`. ### Defining the Training Process @@ -257,7 +257,7 @@ After 10 epochs, the accuracy on the test set is about 96.31%. **Validate the model.** -Use the saved checkpoint file to load the validation dataset through [eval.py]() in the lenet directory of models. +Use the saved checkpoint file to load the validation dataset through [eval.py]() in the lenet directory of models. ```bash python eval.py --data_path=./MNIST_Data --ckpt_path=./gradient_accumulation.ckpt --device_target=GPU diff --git a/docs/mindspore/programming_guide/source_en/apply_parameter_server_training.md b/docs/mindspore/programming_guide/source_en/apply_parameter_server_training.md index 17d9df1616..632b4f2ff6 100644 --- a/docs/mindspore/programming_guide/source_en/apply_parameter_server_training.md +++ b/docs/mindspore/programming_guide/source_en/apply_parameter_server_training.md @@ -41,7 +41,7 @@ Learn how to train a LeNet using the [MNIST dataset](http://yann.lecun.com/exdb/ - The size of the weight which is updated by Parameter Server should not exceed INT_MAX(2^31 - 1) bytes. - The interface `set_param_ps` can receive a `bool` parameter:`init_in_server`, indicating whether this training parameter is initialized on the Server side. `init_in_server` defaults to `False`, indicating that this training parameter is initialized on Worker. Currently, only the training parameter `embedding_table` of the `EmbeddingLookup` operator is supported to be initialized on Server side to solve the problem of insufficient memory caused by the initialization of a large shape `embedding_table` on Worker. The `EmbeddingLookup` operator's `target` attribute needs to be set to 'CPU'. The training parameter initialized on the Server side will no longer be synchronized to Worker. If it involves multi-Server training and saves CheckPoint, each Server will save a CheckPoint after the training. -3. On the basis of the [original training script](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/train.py), set all LeNet model weights to be trained on the parameter server: +3. On the basis of the [original training script](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/train.py), set all LeNet model weights to be trained on the parameter server: ```python context.set_ps_context(enable_ps=True) diff --git a/docs/mindspore/programming_guide/source_en/cv_resnet50.md b/docs/mindspore/programming_guide/source_en/cv_resnet50.md index fafcac621e..ae5037667c 100644 --- a/docs/mindspore/programming_guide/source_en/cv_resnet50.md +++ b/docs/mindspore/programming_guide/source_en/cv_resnet50.md @@ -142,7 +142,7 @@ CNN is a standard algorithm for image classification tasks. CNN uses a layered s ResNet is recommended. First, it is deep enough with 34 layers, 50 layers, or 101 layers. The deeper the hierarchy, the stronger the representation capability, and the higher the classification accuracy. Second, it is learnable. The residual structure is used. The lower layer is directly connected to the upper layer through the shortcut connection, which solves the problem of gradient disappearance caused by the network depth during the reverse propagation. In addition, the ResNet network has good performance, including the recognition accuracy, model size, and parameter quantity. -MindSpore Model Zoo has a ResNet [model](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/resnet.py). The calling method is as follows: +MindSpore Model Zoo has a ResNet [model](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/resnet.py). The calling method is as follows: ```python network = resnet50(class_num=10) diff --git a/docs/mindspore/programming_guide/source_en/cv_resnet50_second_order_optimizer.md b/docs/mindspore/programming_guide/source_en/cv_resnet50_second_order_optimizer.md index ba2708cf1c..5405855ef0 100644 --- a/docs/mindspore/programming_guide/source_en/cv_resnet50_second_order_optimizer.md +++ b/docs/mindspore/programming_guide/source_en/cv_resnet50_second_order_optimizer.md @@ -173,7 +173,7 @@ def create_dataset2(dataset_path, do_train, repeat_num=1, batch_size=32, target= ## Defining the Network -Use the ResNet-50 v1.5 network model as an example. Define the [ResNet-50 network](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/resnet.py). +Use the ResNet-50 v1.5 network model as an example. Define the [ResNet-50 network](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/resnet.py). After the network is built, call the defined ResNet-50 in the `__main__` function. diff --git a/docs/mindspore/programming_guide/source_en/dump_in_graph_mode.md b/docs/mindspore/programming_guide/source_en/dump_in_graph_mode.md index c10eebb17e..e45f0793f8 100644 --- a/docs/mindspore/programming_guide/source_en/dump_in_graph_mode.md +++ b/docs/mindspore/programming_guide/source_en/dump_in_graph_mode.md @@ -236,7 +236,7 @@ Since sub-graphs share the same graph execution history with root graph, only ro For the Ascend scene, after the graph corresponding to the script is saved to the disk through the Dump function, the final execution graph file `ms_output_trace_code_graph_{graph_id}.ir` will be generated. This file saves the stack information of each operator in the corresponding graph, and records the generation script corresponding to the operator. -Take [AlexNet script](https://gitee.com/mindspore/models/blob/master/official/cv/alexnet/src/alexnet.py) as an example: +Take [AlexNet script](https://gitee.com/mindspore/models/blob/r1.6/official/cv/alexnet/src/alexnet.py) as an example: ```python import mindspore.nn as nn diff --git a/docs/mindspore/programming_guide/source_en/enable_dataset_autotune.md b/docs/mindspore/programming_guide/source_en/enable_dataset_autotune.md index bc445aed58..3dc491a28c 100644 --- a/docs/mindspore/programming_guide/source_en/enable_dataset_autotune.md +++ b/docs/mindspore/programming_guide/source_en/enable_dataset_autotune.md @@ -78,7 +78,7 @@ def create_dataset(...) ### Start Training -Start the training process as described in [resnet/README.md](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/README.md). Dataset AutoTune will display its analysis result through LOG messages. +Start the training process as described in [resnet/README.md](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/README.md). Dataset AutoTune will display its analysis result through LOG messages. ```text [INFO] [auto_tune.cc:73 LaunchThread] Launching Dataset AutoTune thread diff --git a/docs/mindspore/programming_guide/source_en/load_dataset_networks.md b/docs/mindspore/programming_guide/source_en/load_dataset_networks.md index f4347b82d0..fef956503e 100644 --- a/docs/mindspore/programming_guide/source_en/load_dataset_networks.md +++ b/docs/mindspore/programming_guide/source_en/load_dataset_networks.md @@ -6,34 +6,34 @@ | Domain | Sub Domain | Network | |:---- |:------- |:---- | -|Computer Vision | Image Classification| [AlexNet](https://gitee.com/mindspore/models/blob/master/official/cv/alexnet/src/dataset.py) -| Computer Vision | Image Classification| [CNN](https://gitee.com/mindspore/models/blob/master/official/cv/cnn_direction_model/src/dataset.py) | -| Computer Vision | Image Classification| [GoogLeNet](https://gitee.com/mindspore/models/blob/master/official/cv/googlenet/src/dataset.py) | -| Computer Vision | Image Classification| [LeNet](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/src/dataset.py) | -| Computer Vision | Image Classification| [MobileNetV3](https://gitee.com/mindspore/models/blob/master/official/cv/mobilenetv3/src/dataset.py) | -| Computer Vision | Image Classification| [ResNet-50](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/dataset.py) | -| Computer Vision | Image Classification| [VGG16](https://gitee.com/mindspore/models/blob/master/official/cv/vgg16/src/dataset.py) | -| Computer Vision | Object Detection | [CenterFace](https://gitee.com/mindspore/models/blob/master/official/cv/centerface/src/dataset.py) | -| Computer Vision | Object Detection | [CTPN](https://gitee.com/mindspore/models/blob/master/official/cv/ctpn/src/dataset.py) | -| Computer Vision | Object Detection | [Faster R-CNN](https://gitee.com/mindspore/models/blob/master/official/cv/faster_rcnn/src/dataset.py) | -| Computer Vision | Object Detection | [Mask R-CNN](https://gitee.com/mindspore/models/blob/master/official/cv/maskrcnn/src/dataset.py) | -| Computer Vision | Object Detection | [SSD](https://gitee.com/mindspore/models/blob/master/official/cv/ssd/src/dataset.py) | -| Computer Vision | Object Detection |[YOLOv4](https://gitee.com/mindspore/models/blob/master/official/cv/yolov4/src/yolo_dataset.py) | -| Computer Vision | Text Detection | [DeepText](https://gitee.com/mindspore/models/blob/master/official/cv/deeptext/src/dataset.py) | -| Computer Vision | Semantic Segmentation | [DeepLabV3](https://gitee.com/mindspore/models/blob/master/official/cv/deeplabv3/src/data/dataset.py) | -| Computer Vision | Keypoint Detection |[OpenPose](https://gitee.com/mindspore/models/blob/master/official/cv/openpose/src/dataset.py) | -| Computer Vision | Keypoint Detection |[SimplePoseNet](https://gitee.com/mindspore/models/blob/master/official/cv/simple_pose/src/dataset.py) | -| Computer Vision | Optical Character Recognition |[CRNN](https://gitee.com/mindspore/models/blob/master/official/cv/crnn/src/dataset.py) | -| Natural Language Processing | Natural Language Understanding | [BERT](https://gitee.com/mindspore/models/blob/master/official/nlp/bert/src/dataset.py) | -| Natural Language Processing | Natural Language Understanding | [FastText](https://gitee.com/mindspore/models/blob/master/official/nlp/fasttext/src/dataset.py) | -| Natural Language Processing | Natural Language Understanding | [GRU](https://gitee.com/mindspore/models/blob/master/official/nlp/gru/src/dataset.py) | -| Natural Language Processing | Natural Language Understanding | [Transformer](https://gitee.com/mindspore/models/blob/master/official/nlp/transformer/src/dataset.py) | -| Natural Language Processing | Natural Language Understanding | [TinyBERT](https://gitee.com/mindspore/models/blob/master/official/nlp/tinybert/src/dataset.py) | -| Natural Language Processing | Natural Language Understanding | [TextCNN](https://gitee.com/mindspore/models/blob/master/official/nlp/textcnn/src/dataset.py) | -| Recommender | Recommender System, CTR prediction | [DeepFM](https://gitee.com/mindspore/models/blob/master/official/recommend/deepfm/src/dataset.py) | -| Recommender | Recommender System, Search, Ranking | [Wide&Deep](https://gitee.com/mindspore/models/blob/master/official/recommend/wide_and_deep/src/datasets.py) | -| Recommender | Recommender System | [NAML](https://gitee.com/mindspore/models/blob/master/official/recommend/naml/src/dataset.py) | -| Recommender | Recommender System | [NCF](https://gitee.com/mindspore/models/blob/master/official/recommend/ncf/src/dataset.py) | -| GNN | Text Classification | [GCN](https://gitee.com/mindspore/models/blob/master/official/gnn/gcn/src/dataset.py) | -| GNN | Text Classification | [GAT](https://gitee.com/mindspore/models/blob/master/official/gnn/gat/src/dataset.py) | -| GNN | Recommender System | [BGCF](https://gitee.com/mindspore/models/blob/master/official/gnn/bgcf/src/dataset.py) | +|Computer Vision | Image Classification| [AlexNet](https://gitee.com/mindspore/models/blob/r1.6/official/cv/alexnet/src/dataset.py) +| Computer Vision | Image Classification| [CNN](https://gitee.com/mindspore/models/blob/r1.6/official/cv/cnn_direction_model/src/dataset.py) | +| Computer Vision | Image Classification| [GoogLeNet](https://gitee.com/mindspore/models/blob/r1.6/official/cv/googlenet/src/dataset.py) | +| Computer Vision | Image Classification| [LeNet](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/src/dataset.py) | +| Computer Vision | Image Classification| [MobileNetV3](https://gitee.com/mindspore/models/blob/r1.6/official/cv/mobilenetv3/src/dataset.py) | +| Computer Vision | Image Classification| [ResNet-50](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/dataset.py) | +| Computer Vision | Image Classification| [VGG16](https://gitee.com/mindspore/models/blob/r1.6/official/cv/vgg16/src/dataset.py) | +| Computer Vision | Object Detection | [CenterFace](https://gitee.com/mindspore/models/blob/r1.6/official/cv/centerface/src/dataset.py) | +| Computer Vision | Object Detection | [CTPN](https://gitee.com/mindspore/models/blob/r1.6/official/cv/ctpn/src/dataset.py) | +| Computer Vision | Object Detection | [Faster R-CNN](https://gitee.com/mindspore/models/blob/r1.6/official/cv/faster_rcnn/src/dataset.py) | +| Computer Vision | Object Detection | [Mask R-CNN](https://gitee.com/mindspore/models/blob/r1.6/official/cv/maskrcnn/src/dataset.py) | +| Computer Vision | Object Detection | [SSD](https://gitee.com/mindspore/models/blob/r1.6/official/cv/ssd/src/dataset.py) | +| Computer Vision | Object Detection |[YOLOv4](https://gitee.com/mindspore/models/blob/r1.6/official/cv/yolov4/src/yolo_dataset.py) | +| Computer Vision | Text Detection | [DeepText](https://gitee.com/mindspore/models/blob/r1.6/official/cv/deeptext/src/dataset.py) | +| Computer Vision | Semantic Segmentation | [DeepLabV3](https://gitee.com/mindspore/models/blob/r1.6/official/cv/deeplabv3/src/data/dataset.py) | +| Computer Vision | Keypoint Detection |[OpenPose](https://gitee.com/mindspore/models/blob/r1.6/official/cv/openpose/src/dataset.py) | +| Computer Vision | Keypoint Detection |[SimplePoseNet](https://gitee.com/mindspore/models/blob/r1.6/official/cv/simple_pose/src/dataset.py) | +| Computer Vision | Optical Character Recognition |[CRNN](https://gitee.com/mindspore/models/blob/r1.6/official/cv/crnn/src/dataset.py) | +| Natural Language Processing | Natural Language Understanding | [BERT](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/bert/src/dataset.py) | +| Natural Language Processing | Natural Language Understanding | [FastText](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/fasttext/src/dataset.py) | +| Natural Language Processing | Natural Language Understanding | [GRU](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/gru/src/dataset.py) | +| Natural Language Processing | Natural Language Understanding | [Transformer](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/transformer/src/dataset.py) | +| Natural Language Processing | Natural Language Understanding | [TinyBERT](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/tinybert/src/dataset.py) | +| Natural Language Processing | Natural Language Understanding | [TextCNN](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/textcnn/src/dataset.py) | +| Recommender | Recommender System, CTR prediction | [DeepFM](https://gitee.com/mindspore/models/blob/r1.6/official/recommend/deepfm/src/dataset.py) | +| Recommender | Recommender System, Search, Ranking | [Wide&Deep](https://gitee.com/mindspore/models/blob/r1.6/official/recommend/wide_and_deep/src/datasets.py) | +| Recommender | Recommender System | [NAML](https://gitee.com/mindspore/models/blob/r1.6/official/recommend/naml/src/dataset.py) | +| Recommender | Recommender System | [NCF](https://gitee.com/mindspore/models/blob/r1.6/official/recommend/ncf/src/dataset.py) | +| GNN | Text Classification | [GCN](https://gitee.com/mindspore/models/blob/r1.6/official/gnn/gcn/src/dataset.py) | +| GNN | Text Classification | [GAT](https://gitee.com/mindspore/models/blob/r1.6/official/gnn/gat/src/dataset.py) | +| GNN | Recommender System | [BGCF](https://gitee.com/mindspore/models/blob/r1.6/official/gnn/bgcf/src/dataset.py) | diff --git a/docs/mindspore/programming_guide/source_en/multi_platform_inference_gpu.md b/docs/mindspore/programming_guide/source_en/multi_platform_inference_gpu.md index 8797afae2f..39ffe69ec4 100644 --- a/docs/mindspore/programming_guide/source_en/multi_platform_inference_gpu.md +++ b/docs/mindspore/programming_guide/source_en/multi_platform_inference_gpu.md @@ -152,7 +152,7 @@ infer finished. ### Notices -- During the training process, some networks set operator precision to FP16 artificially. For example, the [Bert mode](https://gitee.com/mindspore/models/blob/master/official/nlp/bert/src/bert_model.py) set the `Dense` and `LayerNorm` to FP16: +- During the training process, some networks set operator precision to FP16 artificially. For example, the [Bert mode](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/bert/src/bert_model.py) set the `Dense` and `LayerNorm` to FP16: ```python class BertOutput(nn.Cell): diff --git a/docs/mindspore/programming_guide/source_en/nlp_sentimentnet.md b/docs/mindspore/programming_guide/source_en/nlp_sentimentnet.md index fb9bf0d2a6..210703414d 100644 --- a/docs/mindspore/programming_guide/source_en/nlp_sentimentnet.md +++ b/docs/mindspore/programming_guide/source_en/nlp_sentimentnet.md @@ -159,7 +159,7 @@ if config.preprocess == "true": ``` > After successful conversion, `mindrecord` files are generated under the directory `preprocess_path`. Usually, this operation does not need to be performed every time if the dataset is unchanged. -> For `convert_to_mindrecord`, you can find the complete definition at: . +> For `convert_to_mindrecord`, you can find the complete definition at: . > It consists of two steps: > >1. Process the text dataset, including encoding, word segmentation, alignment, and processing the original GloVe data to adapt to the network structure. @@ -184,7 +184,7 @@ network = SentimentNet(vocab_size=embedding_table.shape[0], batch_size=config.batch_size) ``` -> For `SentimentNet`, you can find the complete definition at: . +> For `SentimentNet`, you can find the complete definition at: . ### Pre-Training @@ -224,7 +224,7 @@ else: print("============== Training Success ==============") ``` -> For `lstm_create_dataset`, you can find the complete definition at: . +> For `lstm_create_dataset`, you can find the complete definition at: . ### Validating the Model diff --git a/docs/mindspore/programming_guide/source_en/online_inference.md b/docs/mindspore/programming_guide/source_en/online_inference.md index 29d5e4811f..f5230b4096 100644 --- a/docs/mindspore/programming_guide/source_en/online_inference.md +++ b/docs/mindspore/programming_guide/source_en/online_inference.md @@ -26,7 +26,7 @@ print("============== {} ==============".format(acc)) In the preceding information: `model.eval` is an API for model validation. For details about the API, see . -> Inference sample code: . +> Inference sample code: . ### Remote Storage diff --git a/docs/mindspore/programming_guide/source_zh_cn/apply_adaptive_summation.md b/docs/mindspore/programming_guide/source_zh_cn/apply_adaptive_summation.md index 45a48ce54c..c544fc2b47 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/apply_adaptive_summation.md +++ b/docs/mindspore/programming_guide/source_zh_cn/apply_adaptive_summation.md @@ -97,7 +97,7 @@ $$ } ``` -rank_table可以使用models下面的[hccl_tools.py](https://gitee.com/mindspore/models/blob/master/utils/hccl_tools/hccl_tools.py)生成,[merge_hccl.py](https://gitee.com/mindspore/models/blob/master/utils/hccl_tools/merge_hccl.py)可将多个rank_table文件进行拼接。脚本使用方法可见[README.md](https://gitee.com/mindspore/models/blob/master/utils/hccl_tools/README.md)。 +rank_table可以使用models下面的[hccl_tools.py](https://gitee.com/mindspore/models/blob/r1.6/utils/hccl_tools/hccl_tools.py)生成,[merge_hccl.py](https://gitee.com/mindspore/models/blob/r1.6/utils/hccl_tools/merge_hccl.py)可将多个rank_table文件进行拼接。脚本使用方法可见[README.md](https://gitee.com/mindspore/models/blob/r1.6/utils/hccl_tools/README.md)。 ### 数据集准备 @@ -130,7 +130,7 @@ init() ## 数据并行模式加载数据集 -分布式训练时,数据以数据并行的方式导入。利用MindSpore提供图片加载接口ImageFolderDataset加载ImageNet 2012数据集,同时通过MindSpore提供的数据增强接口对数据集进行处理,此部分代码由models中`resnet`目录下的[dataset.py](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/dataset.py)导入。 +分布式训练时,数据以数据并行的方式导入。利用MindSpore提供图片加载接口ImageFolderDataset加载ImageNet 2012数据集,同时通过MindSpore提供的数据增强接口对数据集进行处理,此部分代码由models中`resnet`目录下的[dataset.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/dataset.py)导入。 ```python # define train dataset diff --git a/docs/mindspore/programming_guide/source_zh_cn/apply_dimention_reduce_training.md b/docs/mindspore/programming_guide/source_zh_cn/apply_dimention_reduce_training.md index 84850f2a11..1095b09934 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/apply_dimention_reduce_training.md +++ b/docs/mindspore/programming_guide/source_zh_cn/apply_dimention_reduce_training.md @@ -24,7 +24,7 @@ ### 配置分布式环境变量 -在本地Ascend处理器上进行分布式训练时,需要配置当前多卡环境的组网信息文件,1个8卡环境的json文件配置如下,本样例将该配置文件命名为rank_table_8pcs.json。rank_table可以使用models下面的[hccl_tools.py](https://gitee.com/mindspore/models/blob/master/utils/hccl_tools/hccl_tools.py)生成。 +在本地Ascend处理器上进行分布式训练时,需要配置当前多卡环境的组网信息文件,1个8卡环境的json文件配置如下,本样例将该配置文件命名为rank_table_8pcs.json。rank_table可以使用models下面的[hccl_tools.py](https://gitee.com/mindspore/models/blob/r1.6/utils/hccl_tools/hccl_tools.py)生成。 ```json { @@ -88,7 +88,7 @@ init() ### 加载数据集 -利用MindSpore提供图片加载接口ImageFolderDataset加载ImageNet 2012数据集,同时通过MindSpore提供的数据增强接口对数据集进行处理,此部分代码由models中`resnet`目录下的[dataset.py](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/dataset.py)导入。 +利用MindSpore提供图片加载接口ImageFolderDataset加载ImageNet 2012数据集,同时通过MindSpore提供的数据增强接口对数据集进行处理,此部分代码由models中`resnet`目录下的[dataset.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/dataset.py)导入。 ```python # define train dataset @@ -112,9 +112,9 @@ init_weight(net=net) 定义模型所需的损失函数loss、optimizer等。 -loss使用CrossEntropySmooth,由ModelZoo中`resnet`目录下的[CrossEntropySmooth.py](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/CrossEntropySmooth.py)导入。 +loss使用CrossEntropySmooth,由ModelZoo中`resnet`目录下的[CrossEntropySmooth.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/CrossEntropySmooth.py)导入。 -学习率lr的构建代码由models中`resnet`目录下的[lr_generator.py](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/lr_generator.py)导入。 +学习率lr的构建代码由models中`resnet`目录下的[lr_generator.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/lr_generator.py)导入。 ```python # define loss diff --git a/docs/mindspore/programming_guide/source_zh_cn/apply_gradient_accumulation.md b/docs/mindspore/programming_guide/source_zh_cn/apply_gradient_accumulation.md index 0af0c3d1f9..af5b5f9ce8 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/apply_gradient_accumulation.md +++ b/docs/mindspore/programming_guide/source_zh_cn/apply_gradient_accumulation.md @@ -97,11 +97,11 @@ from models.official.cv.lenet.src.lenet import LeNet5 #### 加载数据集 -利用MindSpore的`dataset`提供的`MnistDataset`接口加载MNIST数据集,此部分代码由models中`lenet`目录下的[dataset.py](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/src/dataset.py)导入。 +利用MindSpore的`dataset`提供的`MnistDataset`接口加载MNIST数据集,此部分代码由models中`lenet`目录下的[dataset.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/src/dataset.py)导入。 #### 定义网络 -这里以LeNet网络为例进行介绍,当然也可以使用其它的网络,如ResNet-50、BERT等, 此部分代码由models中`lenet`目录下的[lenet.py](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/src/lenet.py)导入。 +这里以LeNet网络为例进行介绍,当然也可以使用其它的网络,如ResNet-50、BERT等, 此部分代码由models中`lenet`目录下的[lenet.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/src/lenet.py)导入。 #### 定义训练流程 @@ -293,7 +293,7 @@ if __name__ == "__main__": **验证模型:** -通过models中`lenet`目录下的[eval.py](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/train.py),使用保存的CheckPoint文件,加载验证数据集,进行验证。 +通过models中`lenet`目录下的[eval.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/train.py),使用保存的CheckPoint文件,加载验证数据集,进行验证。 ```bash python eval.py --data_path=./MNIST_Data --ckpt_path=./gradient_accumulation.ckpt --device_target=GPU @@ -334,11 +334,11 @@ from models.official.cv.lenet.src.lenet import LeNet5 #### 加载数据集 -利用MindSpore的`dataset`提供的`MnistDataset`接口加载MNIST数据集,此部分代码由models中`lenet`目录下的[dataset.py](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/src/dataset.py)导入。 +利用MindSpore的`dataset`提供的`MnistDataset`接口加载MNIST数据集,此部分代码由models中`lenet`目录下的[dataset.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/src/dataset.py)导入。 #### 定义网络 -这里以LeNet网络为例进行介绍,当然也可以使用其它的网络,如ResNet-50、BERT等, 此部分代码由models中`lenet`目录下的[lenet.py](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/src/lenet.py)导入。 +这里以LeNet网络为例进行介绍,当然也可以使用其它的网络,如ResNet-50、BERT等, 此部分代码由models中`lenet`目录下的[lenet.py](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/src/lenet.py)导入。 #### 定义训练模型 diff --git a/docs/mindspore/programming_guide/source_zh_cn/apply_parameter_server_training.md b/docs/mindspore/programming_guide/source_zh_cn/apply_parameter_server_training.md index 56b72d8667..4d6c3c6988 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/apply_parameter_server_training.md +++ b/docs/mindspore/programming_guide/source_zh_cn/apply_parameter_server_training.md @@ -41,7 +41,7 @@ MindSpore的参数服务器采用了自研的通信框架作为基础架构, - 被设置为通过Parameter Server更新的单个权重大小不得超过INT_MAX(2^31 - 1)字节。 - 接口`set_param_ps`可接收一个`bool`型参数:`init_in_server`,表示该训练参数是否在Server端初始化,`init_in_server`默认值为`False`,表示在Worker上初始化该训练参数;当前仅支持`EmbeddingLookup`算子的训练参数`embedding_table`在Server端初始化,以解决超大shape的`embedding_table`在Worker上初始化导致内存不足的问题,该算子的`target`属性需要设置为'CPU'。在Server端初始化的训练参数将不再同步到Worker上,如果涉及到多Server训练并保存CheckPoint,则训练结束后每个Server均会保存一个CheckPoint。 -3. 在[LeNet原训练脚本](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/train.py)基础上,设置该模型所有权重由Parameter Server训练: +3. 在[LeNet原训练脚本](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/train.py)基础上,设置该模型所有权重由Parameter Server训练: ```python context.set_ps_context(enable_ps=True) diff --git a/docs/mindspore/programming_guide/source_zh_cn/cv_resnet50.md b/docs/mindspore/programming_guide/source_zh_cn/cv_resnet50.md index 0ec3b930db..8b6bbcee51 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/cv_resnet50.md +++ b/docs/mindspore/programming_guide/source_zh_cn/cv_resnet50.md @@ -144,7 +144,7 @@ tar -zvxf cifar-10-binary.tar.gz ResNet通常是较好的选择。首先,它足够深,常见的有34层,50层,101层。通常层次越深,表征能力越强,分类准确率越高。其次,可学习,采用了残差结构,通过shortcut连接把低层直接跟高层相连,解决了反向传播过程中因为网络太深造成的梯度消失问题。此外,ResNet网络的性能很好,既表现为识别的准确率,也包括它本身模型的大小和参数量。 -MindSpore Model Zoo中已经实现了ResNet模型,可以采用[ResNet-50](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/resnet.py)。调用方法如下: +MindSpore Model Zoo中已经实现了ResNet模型,可以采用[ResNet-50](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/resnet.py)。调用方法如下: ```python network = resnet50(class_num=10) diff --git a/docs/mindspore/programming_guide/source_zh_cn/cv_resnet50_second_order_optimizer.md b/docs/mindspore/programming_guide/source_zh_cn/cv_resnet50_second_order_optimizer.md index 83bba03f17..813c43d699 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/cv_resnet50_second_order_optimizer.md +++ b/docs/mindspore/programming_guide/source_zh_cn/cv_resnet50_second_order_optimizer.md @@ -175,7 +175,7 @@ def create_dataset2(dataset_path, do_train, repeat_num=1, batch_size=32, target= ## 定义网络 -本示例中使用的网络模型为ResNet50-v1.5,定义[ResNet50网络](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/resnet.py)。 +本示例中使用的网络模型为ResNet50-v1.5,定义[ResNet50网络](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/resnet.py)。 网络构建完成以后,在`__main__`函数中调用定义好的ResNet50: diff --git a/docs/mindspore/programming_guide/source_zh_cn/dump_in_graph_mode.md b/docs/mindspore/programming_guide/source_zh_cn/dump_in_graph_mode.md index be02bc2491..c8d8db5c69 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/dump_in_graph_mode.md +++ b/docs/mindspore/programming_guide/source_zh_cn/dump_in_graph_mode.md @@ -236,7 +236,7 @@ ms_global_execution_order_graph_{graph_id}.csv 对于Ascend场景,在通过Dump功能将脚本对应的图保存到磁盘上后,会产生最终执行图文件`ms_output_trace_code_graph_{graph_id}.ir`。该文件中保存了对应的图中每个算子的堆栈信息,记录了算子对应的生成脚本。 -以[AlexNet脚本](https://gitee.com/mindspore/models/blob/master/official/cv/alexnet/src/alexnet.py)为例 : +以[AlexNet脚本](https://gitee.com/mindspore/models/blob/r1.6/official/cv/alexnet/src/alexnet.py)为例 : ```python import mindspore.nn as nn diff --git a/docs/mindspore/programming_guide/source_zh_cn/enable_dataset_autotune.md b/docs/mindspore/programming_guide/source_zh_cn/enable_dataset_autotune.md index 9011107c59..7f8b1ec573 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/enable_dataset_autotune.md +++ b/docs/mindspore/programming_guide/source_zh_cn/enable_dataset_autotune.md @@ -80,7 +80,7 @@ def create_dataset(...) ### 开始训练 -根据[resnet/README.md](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/README_CN.md)所描述的步骤 +根据[resnet/README.md](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/README_CN.md)所描述的步骤 启动CIFAR10数据集的训练,随后自动数据加速模块会通过LOG的形式展示其对于性能瓶颈的分析情况: ```text diff --git a/docs/mindspore/programming_guide/source_zh_cn/load_dataset_networks.md b/docs/mindspore/programming_guide/source_zh_cn/load_dataset_networks.md index 29e2ef999e..3f5202133b 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/load_dataset_networks.md +++ b/docs/mindspore/programming_guide/source_zh_cn/load_dataset_networks.md @@ -6,34 +6,34 @@ | 领域 | 子领域 | 网络 | |:---- |:------- |:---- | -|计算机视觉 | 图像分类 | [AlexNet](https://gitee.com/mindspore/models/blob/master/official/cv/alexnet/src/dataset.py) -| 计算机视觉 | 图像分类 | [CNN](https://gitee.com/mindspore/models/blob/master/official/cv/cnn_direction_model/src/dataset.py) | -| 计算机视觉 | 图像分类 | [GoogLeNet](https://gitee.com/mindspore/models/blob/master/official/cv/googlenet/src/dataset.py) | -| 计算机视觉 | 图像分类 | [LeNet](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/src/dataset.py) | -| 计算机视觉 | 图像分类 | [MobileNetV3](https://gitee.com/mindspore/models/blob/master/official/cv/mobilenetv3/src/dataset.py) | -| 计算机视觉 | 图像分类 | [ResNet-50](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/dataset.py) | -| 计算机视觉 | 图像分类 | [VGG16](https://gitee.com/mindspore/models/blob/master/official/cv/vgg16/src/dataset.py) | -| 计算机视觉 | 目标检测 | [CenterFace](https://gitee.com/mindspore/models/blob/master/official/cv/centerface/src/dataset.py) | -| 计算机视觉 | 目标检测 | [CTPN](https://gitee.com/mindspore/models/blob/master/official/cv/ctpn/src/dataset.py) | -| 计算机视觉 | 目标检测 | [Faster R-CNN](https://gitee.com/mindspore/models/blob/master/official/cv/faster_rcnn/src/dataset.py) | -| 计算机视觉 | 目标检测 | [Mask R-CNN](https://gitee.com/mindspore/models/blob/master/official/cv/maskrcnn/src/dataset.py) | -| 计算机视觉 | 目标检测 | [SSD](https://gitee.com/mindspore/models/blob/master/official/cv/ssd/src/dataset.py) | -| 计算机视觉 | 目标检测 |[YOLOv4](https://gitee.com/mindspore/models/blob/master/official/cv/yolov4/src/yolo_dataset.py) | -| 计算机视觉 | 文本检测 | [DeepText](https://gitee.com/mindspore/models/blob/master/official/cv/deeptext/src/dataset.py) | -| 计算机视觉 | 语义分割 | [DeepLabV3](https://gitee.com/mindspore/models/blob/master/official/cv/deeplabv3/src/data/dataset.py) | -| 计算机视觉 | 关键点检测 |[OpenPose](https://gitee.com/mindspore/models/blob/master/official/cv/openpose/src/dataset.py) | -| 计算机视觉 | 关键点检测 |[SimplePoseNet](https://gitee.com/mindspore/models/blob/master/official/cv/simple_pose/src/dataset.py) | -| 计算机视觉 | 光学字符识 |[CRNN](https://gitee.com/mindspore/models/blob/master/official/cv/crnn/src/dataset.py) | -| 自然语言处理 | 自然语言理解 | [BERT](https://gitee.com/mindspore/models/blob/master/official/nlp/bert/src/dataset.py) | -| 自然语言处理 | 自然语言理解 | [FastText](https://gitee.com/mindspore/models/blob/master/official/nlp/fasttext/src/dataset.py) | -| 自然语言处理 | 自然语言理解 | [GRU](https://gitee.com/mindspore/models/blob/master/official/nlp/gru/src/dataset.py) | -| 自然语言处理 | 自然语言理解 | [Transformer](https://gitee.com/mindspore/models/blob/master/official/nlp/transformer/src/dataset.py) | -| 自然语言处理 | 自然语言理解 | [TinyBERT](https://gitee.com/mindspore/models/blob/master/official/nlp/tinybert/src/dataset.py) | -| 自然语言处理 | 自然语言理解 | [TextCNN](https://gitee.com/mindspore/models/blob/master/official/nlp/textcnn/src/dataset.py) | -| 推荐 | 推荐系统、点击率预估 | [DeepFM](https://gitee.com/mindspore/models/blob/master/official/recommend/deepfm/src/dataset.py) | -| 推荐 | 推荐系统、搜索、排序 | [Wide&Deep](https://gitee.com/mindspore/models/blob/master/official/recommend/wide_and_deep/src/datasets.py) | -| 推荐 | 推荐系统 | [NAML](https://gitee.com/mindspore/models/blob/master/official/recommend/naml/src/dataset.py) | -| 推荐 | 推荐系统 | [NCF](https://gitee.com/mindspore/models/blob/master/official/recommend/ncf/src/dataset.py) | -| 图神经网络 | 文本分类 | [GCN](https://gitee.com/mindspore/models/blob/master/official/gnn/gcn/src/dataset.py) | -| 图神经网络 | 文本分类 | [GAT](https://gitee.com/mindspore/models/blob/master/official/gnn/gat/src/dataset.py) | -| 图神经网络 | 推荐系统 | [BGCF](https://gitee.com/mindspore/models/blob/master/official/gnn/bgcf/src/dataset.py) | +|计算机视觉 | 图像分类 | [AlexNet](https://gitee.com/mindspore/models/blob/r1.6/official/cv/alexnet/src/dataset.py) +| 计算机视觉 | 图像分类 | [CNN](https://gitee.com/mindspore/models/blob/r1.6/official/cv/cnn_direction_model/src/dataset.py) | +| 计算机视觉 | 图像分类 | [GoogLeNet](https://gitee.com/mindspore/models/blob/r1.6/official/cv/googlenet/src/dataset.py) | +| 计算机视觉 | 图像分类 | [LeNet](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/src/dataset.py) | +| 计算机视觉 | 图像分类 | [MobileNetV3](https://gitee.com/mindspore/models/blob/r1.6/official/cv/mobilenetv3/src/dataset.py) | +| 计算机视觉 | 图像分类 | [ResNet-50](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/dataset.py) | +| 计算机视觉 | 图像分类 | [VGG16](https://gitee.com/mindspore/models/blob/r1.6/official/cv/vgg16/src/dataset.py) | +| 计算机视觉 | 目标检测 | [CenterFace](https://gitee.com/mindspore/models/blob/r1.6/official/cv/centerface/src/dataset.py) | +| 计算机视觉 | 目标检测 | [CTPN](https://gitee.com/mindspore/models/blob/r1.6/official/cv/ctpn/src/dataset.py) | +| 计算机视觉 | 目标检测 | [Faster R-CNN](https://gitee.com/mindspore/models/blob/r1.6/official/cv/faster_rcnn/src/dataset.py) | +| 计算机视觉 | 目标检测 | [Mask R-CNN](https://gitee.com/mindspore/models/blob/r1.6/official/cv/maskrcnn/src/dataset.py) | +| 计算机视觉 | 目标检测 | [SSD](https://gitee.com/mindspore/models/blob/r1.6/official/cv/ssd/src/dataset.py) | +| 计算机视觉 | 目标检测 |[YOLOv4](https://gitee.com/mindspore/models/blob/r1.6/official/cv/yolov4/src/yolo_dataset.py) | +| 计算机视觉 | 文本检测 | [DeepText](https://gitee.com/mindspore/models/blob/r1.6/official/cv/deeptext/src/dataset.py) | +| 计算机视觉 | 语义分割 | [DeepLabV3](https://gitee.com/mindspore/models/blob/r1.6/official/cv/deeplabv3/src/data/dataset.py) | +| 计算机视觉 | 关键点检测 |[OpenPose](https://gitee.com/mindspore/models/blob/r1.6/official/cv/openpose/src/dataset.py) | +| 计算机视觉 | 关键点检测 |[SimplePoseNet](https://gitee.com/mindspore/models/blob/r1.6/official/cv/simple_pose/src/dataset.py) | +| 计算机视觉 | 光学字符识 |[CRNN](https://gitee.com/mindspore/models/blob/r1.6/official/cv/crnn/src/dataset.py) | +| 自然语言处理 | 自然语言理解 | [BERT](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/bert/src/dataset.py) | +| 自然语言处理 | 自然语言理解 | [FastText](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/fasttext/src/dataset.py) | +| 自然语言处理 | 自然语言理解 | [GRU](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/gru/src/dataset.py) | +| 自然语言处理 | 自然语言理解 | [Transformer](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/transformer/src/dataset.py) | +| 自然语言处理 | 自然语言理解 | [TinyBERT](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/tinybert/src/dataset.py) | +| 自然语言处理 | 自然语言理解 | [TextCNN](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/textcnn/src/dataset.py) | +| 推荐 | 推荐系统、点击率预估 | [DeepFM](https://gitee.com/mindspore/models/blob/r1.6/official/recommend/deepfm/src/dataset.py) | +| 推荐 | 推荐系统、搜索、排序 | [Wide&Deep](https://gitee.com/mindspore/models/blob/r1.6/official/recommend/wide_and_deep/src/datasets.py) | +| 推荐 | 推荐系统 | [NAML](https://gitee.com/mindspore/models/blob/r1.6/official/recommend/naml/src/dataset.py) | +| 推荐 | 推荐系统 | [NCF](https://gitee.com/mindspore/models/blob/r1.6/official/recommend/ncf/src/dataset.py) | +| 图神经网络 | 文本分类 | [GCN](https://gitee.com/mindspore/models/blob/r1.6/official/gnn/gcn/src/dataset.py) | +| 图神经网络 | 文本分类 | [GAT](https://gitee.com/mindspore/models/blob/r1.6/official/gnn/gat/src/dataset.py) | +| 图神经网络 | 推荐系统 | [BGCF](https://gitee.com/mindspore/models/blob/r1.6/official/gnn/bgcf/src/dataset.py) | diff --git a/docs/mindspore/programming_guide/source_zh_cn/multi_platform_inference_gpu.md b/docs/mindspore/programming_guide/source_zh_cn/multi_platform_inference_gpu.md index 19fb7f58dc..aa17f09bfb 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/multi_platform_inference_gpu.md +++ b/docs/mindspore/programming_guide/source_zh_cn/multi_platform_inference_gpu.md @@ -167,7 +167,7 @@ infer finished. ### 备注 -- 一些网络在训练过程时,人为将部分算子精度设置为FP16。例如ModelZoo中的[Bert网络](https://gitee.com/mindspore/models/blob/master/official/nlp/bert/src/bert_model.py),将Dense和LayerNorm设置为FP16进行训练。 +- 一些网络在训练过程时,人为将部分算子精度设置为FP16。例如ModelZoo中的[Bert网络](https://gitee.com/mindspore/models/blob/r1.6/official/nlp/bert/src/bert_model.py),将Dense和LayerNorm设置为FP16进行训练。 ```python class BertOutput(nn.Cell): diff --git a/docs/mindspore/programming_guide/source_zh_cn/nlp_sentimentnet.md b/docs/mindspore/programming_guide/source_zh_cn/nlp_sentimentnet.md index 612580d2ce..18ead74820 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/nlp_sentimentnet.md +++ b/docs/mindspore/programming_guide/source_zh_cn/nlp_sentimentnet.md @@ -159,7 +159,7 @@ if config.preprocess == "true": ``` > 转换成功后会在`preprocess_path`路径下生成`mindrecord`文件; 通常该操作在数据集不变的情况下,无需每次训练都执行。 -> `convert_to_mindrecord`函数的具体实现请参考 +> `convert_to_mindrecord`函数的具体实现请参考 > 其中包含两大步骤: > > 1. 解析文本数据集,包括编码、分词、对齐、处理GloVe原始数据,使之能够适应网络结构。 @@ -184,7 +184,7 @@ network = SentimentNet(vocab_size=embedding_table.shape[0], batch_size=config.batch_size) ``` -> `SentimentNet`网络结构的具体实现请参考 +> `SentimentNet`网络结构的具体实现请参考 ### 预训练模型 @@ -224,7 +224,7 @@ else: print("============== Training Success ==============") ``` -> `lstm_create_dataset`函数的具体实现请参考 +> `lstm_create_dataset`函数的具体实现请参考 ### 模型验证 diff --git a/docs/mindspore/programming_guide/source_zh_cn/online_inference.md b/docs/mindspore/programming_guide/source_zh_cn/online_inference.md index d7fb677d4b..255a18e0ad 100644 --- a/docs/mindspore/programming_guide/source_zh_cn/online_inference.md +++ b/docs/mindspore/programming_guide/source_zh_cn/online_inference.md @@ -27,7 +27,7 @@ print("============== {} ==============".format(acc)) 其中, `model.eval`为模型验证接口,对应接口说明:。 -> 推理样例代码:。 +> 推理样例代码:。 ### 使用MindSpore Hub从华为云加载模型 diff --git a/tutorials/source_zh_cn/intermediate/distributed_training/apply_parameter_server_training.md b/tutorials/source_zh_cn/intermediate/distributed_training/apply_parameter_server_training.md index e1ef0e67b9..5781e34324 100644 --- a/tutorials/source_zh_cn/intermediate/distributed_training/apply_parameter_server_training.md +++ b/tutorials/source_zh_cn/intermediate/distributed_training/apply_parameter_server_training.md @@ -39,7 +39,7 @@ Parameter Server(参数服务器)是分布式训练中一种广泛使用的架 - 被设置为通过Parameter Server更新的单个权重大小不得超过INT_MAX(2^31 - 1)字节。 - 接口`set_param_ps`可接收一个`bool`型参数:`init_in_server`,表示该训练参数是否在Server端初始化,`init_in_server`默认值为`False`,表示在Worker上初始化该训练参数;当前仅支持`EmbeddingLookup`算子的训练参数`embedding_table`在Server端初始化,以解决超大shape的`embedding_table`在Worker上初始化导致内存不足的问题,该算子的`target`属性需要设置为'CPU'。在Server端初始化的训练参数将不再同步到Worker上,如果涉及到多Server训练并保存CheckPoint,则训练结束后每个Server均会保存一个CheckPoint。 -3. 在[原训练脚本](https://gitee.com/mindspore/models/blob/master/official/cv/lenet/train.py)基础上,设置LeNet模型所有权重通过Parameter Server训练: +3. 在[原训练脚本](https://gitee.com/mindspore/models/blob/r1.6/official/cv/lenet/train.py)基础上,设置LeNet模型所有权重通过Parameter Server训练: ```python context.set_ps_context(enable_ps=True) diff --git a/tutorials/source_zh_cn/intermediate/image_and_video/transfer_learning.md b/tutorials/source_zh_cn/intermediate/image_and_video/transfer_learning.md index 0b87780099..86f6a593b0 100644 --- a/tutorials/source_zh_cn/intermediate/image_and_video/transfer_learning.md +++ b/tutorials/source_zh_cn/intermediate/image_and_video/transfer_learning.md @@ -154,7 +154,7 @@ Labels: [0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 0 1 0 0 1 0 1] ## 定义网络 -本教程使用的[ResNet50](https://gitee.com/mindspore/models/blob/master/official/cv/resnet/src/resnet.py)网络位于Model Zoo中,可直接使用。 +本教程使用的[ResNet50](https://gitee.com/mindspore/models/blob/r1.6/official/cv/resnet/src/resnet.py)网络位于Model Zoo中,可直接使用。 ## 训练模型 diff --git a/tutorials/source_zh_cn/intermediate/inference/ascend910_and_gpu_inference.ipynb b/tutorials/source_zh_cn/intermediate/inference/ascend910_and_gpu_inference.ipynb index e1db66d3ec..51edfed406 100644 --- a/tutorials/source_zh_cn/intermediate/inference/ascend910_and_gpu_inference.ipynb +++ b/tutorials/source_zh_cn/intermediate/inference/ascend910_and_gpu_inference.ipynb @@ -297,7 +297,7 @@ { "cell_type": "markdown", "source": [ - "推理完整样例代码参见。\n", + "推理完整样例代码参见。\n", "\n", "调用`model.predict`接口执行验证过程,这里选取数据集中的一张图片进行预测:\n", "\n", diff --git a/tutorials/source_zh_cn/intermediate/inference/mindspore_lite_inference.md b/tutorials/source_zh_cn/intermediate/inference/mindspore_lite_inference.md index 1e5cacfb28..6743e96c1b 100644 --- a/tutorials/source_zh_cn/intermediate/inference/mindspore_lite_inference.md +++ b/tutorials/source_zh_cn/intermediate/inference/mindspore_lite_inference.md @@ -21,7 +21,7 @@ ## MindSpore Lite推理流程 -推理代码流程如下,完整代码请参见 [src/java/com/mindspore/imagesegmentation/TrackingMobile](https://gitee.com/mindspore/models/blob/master/official/lite/image_segmentation/app/src/main/java/com/mindspore/imagesegmentation/help/TrackingMobile.java)。 +推理代码流程如下,完整代码请参见 [src/java/com/mindspore/imagesegmentation/TrackingMobile](https://gitee.com/mindspore/models/blob/r1.6/official/lite/image_segmentation/app/src/main/java/com/mindspore/imagesegmentation/help/TrackingMobile.java)。 1. 加载MindSpore Lite模型文件,构建上下文、会话以及用于推理的计算图。 -- Gitee