diff --git a/tutorials/source_en/advanced_use/community.rst b/docs/source_en/community.rst similarity index 100% rename from tutorials/source_en/advanced_use/community.rst rename to docs/source_en/community.rst diff --git a/docs/source_en/index.rst b/docs/source_en/index.rst index 16131f7e380f6d64aa61e1607348360575dcfd4e..11c166a4fecad5bd7928965138c3795fdfd886d5 100644 --- a/docs/source_en/index.rst +++ b/docs/source_en/index.rst @@ -16,3 +16,4 @@ MindSpore Documentation constraints_on_network_construction operator_list glossary + community diff --git a/tutorials/source_zh_cn/advanced_use/community.rst b/docs/source_zh_cn/community.rst similarity index 100% rename from tutorials/source_zh_cn/advanced_use/community.rst rename to docs/source_zh_cn/community.rst diff --git a/docs/source_zh_cn/index.rst b/docs/source_zh_cn/index.rst index 98a53318d71eda9434f5e401e33632ba1b953a64..1c2b8497dbaa31a685c7e7e133162451c17be0ad 100644 --- a/docs/source_zh_cn/index.rst +++ b/docs/source_zh_cn/index.rst @@ -16,3 +16,4 @@ MindSpore文档 constraints_on_network_construction operator_list glossary + community diff --git a/tutorials/source_en/use/debugging_in_pynative_mode.md b/tutorials/source_en/advanced_use/debugging_in_pynative_mode.md similarity index 97% rename from tutorials/source_en/use/debugging_in_pynative_mode.md rename to tutorials/source_en/advanced_use/debugging_in_pynative_mode.md index 24601f4c6e5d57963cec50be9742bd5c0651f97b..2416bad7584618015283087c8c389106e792c023 100644 --- a/tutorials/source_en/use/debugging_in_pynative_mode.md +++ b/tutorials/source_en/advanced_use/debugging_in_pynative_mode.md @@ -6,12 +6,12 @@ - [Overview](#overview) - [Executing a Single Operator](#executing-a-single-operator) - [Executing a Common Function](#executing-a-common-function) - - [Improving PyNative Performance](#improving-pynative-performance) - - [Debugging Network Train Model](#Debugging-network-train-model) + - [Improving PyNative Performance](#improving-pynative-performance) + - [Debugging Network Train Model](#debugging-network-train-model) - + ## Overview diff --git a/tutorials/source_en/advanced_use/distributed_training.md b/tutorials/source_en/advanced_use/distributed_training.md index 0ccbbe1d812dcf1d69e56534d344cd9f86b1167d..370ef6629dc9cbc5ce12ee7251d0a1a9c98d3134 100644 --- a/tutorials/source_en/advanced_use/distributed_training.md +++ b/tutorials/source_en/advanced_use/distributed_training.md @@ -1,8 +1,8 @@ -# Distributed Training +# Getting Started with Distributed Training -- [Distributed Training](#distributed-training) +- [Getting Started with Distributed Training](#getting-started-with-distributed-training) - [Overview](#overview) - [Preparations](#preparations) - [Configuring Distributed Environment Variables](#configuring-distributed-environment-variables) diff --git a/tutorials/source_en/advanced_use/mindspore_cpu_win_install.md b/tutorials/source_en/advanced_use/mindspore_cpu_win_install.md deleted file mode 100644 index e78c89384c9c0248136b5e4aab2b6444cb70e6e2..0000000000000000000000000000000000000000 --- a/tutorials/source_en/advanced_use/mindspore_cpu_win_install.md +++ /dev/null @@ -1,91 +0,0 @@ -# MindSpore Installation Guide on Windows - -This document describes how to quickly install MindSpore on a Windows system with a CPU environment. - - - -- [MindSpore Installation Guide on Windows](#mindspore-installation-guide-on-windows) - - [Environment Requirements](#environment-requirements) - - [System Requirements and Software Dependencies](#system-requirements-and-software-dependencies) - - [(Optional) Installing Conda](#optional-installing-conda) - - [Installation Guide](#installation-guide) - - [Installing Using Executable Files](#installing-using-executable-files) - - [Installing Using the Source Code](#installing-using-the-source-code) - - - - - -## Environment Requirements - -### System Requirements and Software Dependencies - -| Version | Operating System | Executable File Installation Dependencies | Source Code Compilation and Installation Dependencies | -| ---- | :--- | :--- | :--- | -| MindSpore master | Windows 10 x86_64 | - [Python](https://www.python.org/downloads/) 3.7.5
- For details about other dependency items, see [requirements.txt](https://gitee.com/mindspore/mindspore/blob/master/requirements.txt). | **Compilation dependencies:**
- [Python](https://www.python.org/downloads/) 3.7.5
- [MinGW-W64 GCC-7.3.0](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/7.3.0/threads-posix/seh/x86_64-7.3.0-release-posix-seh-rt_v5-rev0.7z) x86_64-posix-seh
- [ActivePerl](http://downloads.activestate.com/ActivePerl/releases/5.24.3.2404/ActivePerl-5.24.3.2404-MSWin32-x64-404865.exe) 5.24.3.2404
- [CMake](https://cmake.org/download/) 3.14.1
- [wheel](https://pypi.org/project/wheel/) >= 0.32.0
**Installation dependencies:**
same as the executable file installation dependencies. | - -- When the network is connected, dependency items in the requirements.txt file are automatically downloaded during .whl package installation. In other cases, you need to manually install dependency items. - -### (Optional) Installing Conda - -1. Download the Conda installation package from the following path: - - - [X86 Anaconda](https://www.anaconda.com/distribution/) or [X86 Miniconda](https://docs.conda.io/en/latest/miniconda.html) - -2. Open Anaconda Prompt from the Windows start menu after installation. -3. Create and activate the Python environment. - - ```bash - conda create -n {your_env_name} python=3.7.5 - conda activate {your_env_name} - ``` - -> Conda is a powerful Python environment management tool. It is recommended that a beginner read related information on the Internet first. - -## Installation Guide - -### Installing Using Executable Files - -1. Download the .whl package the [MindSpore website](https://www.mindspore.cn/versions/en). It is recommended to perform SHA-256 integrity verification first and run the following command to install MindSpore: - - ```bash - pip install mindspore-{version}-cp37-cp37m-win_{arch}.whl - ``` - -2. Run the following command. If no loading error message such as `No module named 'mindspore'` is displayed, the installation is successful. - - ```bash - python - import mindspore - ``` - -### Installing Using the Source Code - -1. Download the source code from the code repository. - - ```bash - git clone https://gitee.com/mindspore/mindspore.git - ``` - -2. Run the following command in the root directory of the source code to compile MindSpore: - - ```bash - call build.bat - ``` - > - Before running the preceding command, ensure that the paths of mingw64\bin\ and the executable files cmake have been added to the environment variable PATH. - > - In the build.sh script, the git clone command will be executed to obtain the code in the third-party dependency database. Ensure that the network settings of Git are correct. - > - If the compiler performance is strong, you can add -j{Number of threads} in to script to increase the number of threads(Default 6). For example, `call build.bat 12`. - > - Before running the preceding command, ensure that [Visual C ++ Redistributable for Visual Studio 2015](https://www.microsoft.com/zh-CN/download/details.aspx?id=48145) is installed. - -3. Run the following command to install MindSpore: - - ```bash - pip install build/package/mindspore-{version}-cp37-cp37m-win_{arch}.whl - ``` - -4. Run the following command. If no loading error message such as `No module named 'mindspore'` is displayed, the installation is successful. - - ```bash - python - import mindspore - ``` diff --git a/tutorials/source_en/index.rst b/tutorials/source_en/index.rst index 59753beb6e26ba59af56c6602b3dabc2c4c7755f..ee2738003ef3478fe19217189b8ae72463629b4d 100644 --- a/tutorials/source_en/index.rst +++ b/tutorials/source_en/index.rst @@ -20,21 +20,49 @@ MindSpore Tutorials use/data_preparation/data_preparation use/saving_and_loading_model_parameters - use/debugging_in_pynative_mode .. toctree:: :glob: :maxdepth: 1 - :caption: Advanced Use + :caption: Application - advanced_use/visualization_tutorials - advanced_use/mixed_precision - advanced_use/distributed_training advanced_use/computer_vision_application advanced_use/nlp_application + +.. toctree:: + :glob: + :maxdepth: 1 + :caption: Model Optimization + + advanced_use/debugging_in_pynative_mode advanced_use/customized_debugging_information + advanced_use/visualization_tutorials + +.. toctree:: + :glob: + :maxdepth: 1 + :caption: Performance Optimization + + advanced_use/distributed_training + advanced_use/mixed_precision + +.. toctree:: + :glob: + :maxdepth: 1 + :caption: Usage on Device + advanced_use/on_device_inference + +.. toctree:: + :glob: + :maxdepth: 1 + :caption: Network Migration + advanced_use/network_migration + +.. toctree:: + :glob: + :maxdepth: 1 + :caption: AI Security + advanced_use/model_security - advanced_use/mindspore_cpu_win_install - advanced_use/community \ No newline at end of file diff --git a/tutorials/source_zh_cn/use/debugging_in_pynative_mode.md b/tutorials/source_zh_cn/advanced_use/debugging_in_pynative_mode.md similarity index 98% rename from tutorials/source_zh_cn/use/debugging_in_pynative_mode.md rename to tutorials/source_zh_cn/advanced_use/debugging_in_pynative_mode.md index cbcaed20386353bde8f243b8438f2c57b375aa14..c6ba9d96ee1ff662311d760158e361c17faa7ac0 100644 --- a/tutorials/source_zh_cn/use/debugging_in_pynative_mode.md +++ b/tutorials/source_zh_cn/advanced_use/debugging_in_pynative_mode.md @@ -6,12 +6,12 @@ - [概述](#概述) - [执行单算子](#执行单算子) - [执行普通函数](#执行普通函数) - - [提升PyNative性能](#提升PyNative性能) + - [提升PyNative性能](#提升pynative性能) - [调试网络训练模型](#调试网络训练模型) - + ## 概述 diff --git a/tutorials/source_zh_cn/advanced_use/distributed_training.md b/tutorials/source_zh_cn/advanced_use/distributed_training.md index 065a468f80c64404e40fef467c130fa60131e4e1..62996de0fdd241fdac27b94e44ac676222f86f31 100644 --- a/tutorials/source_zh_cn/advanced_use/distributed_training.md +++ b/tutorials/source_zh_cn/advanced_use/distributed_training.md @@ -1,10 +1,11 @@ -# 分布式并行训练 +# 分布式并行训练入门 -- [分布式并行训练](#分布式并行训练) +- [分布式并行训练入门](#分布式并行训练入门) - [概述](#概述) - [准备环节](#准备环节) + - [下载数据集](#下载数据集) - [配置分布式环境变量](#配置分布式环境变量) - [调用集合通信库](#调用集合通信库) - [数据并行模式加载数据集](#数据并行模式加载数据集) diff --git a/tutorials/source_zh_cn/advanced_use/distributed_training_tutorials.rst b/tutorials/source_zh_cn/advanced_use/distributed_training_tutorials.rst new file mode 100644 index 0000000000000000000000000000000000000000..2857bab92b5e215d81ca0038a88063e500608138 --- /dev/null +++ b/tutorials/source_zh_cn/advanced_use/distributed_training_tutorials.rst @@ -0,0 +1,8 @@ +分布式并行训练 +=============== + +.. toctree:: + :maxdepth: 1 + + distributed_training + checkpoint_for_hybrid_parallel \ No newline at end of file diff --git a/tutorials/source_zh_cn/advanced_use/mindspore_cpu_win_install.md b/tutorials/source_zh_cn/advanced_use/mindspore_cpu_win_install.md deleted file mode 100644 index 1927381f6dcfb4a5064b1105c843e89a9aa58505..0000000000000000000000000000000000000000 --- a/tutorials/source_zh_cn/advanced_use/mindspore_cpu_win_install.md +++ /dev/null @@ -1,91 +0,0 @@ -# Windows系统安装MindSpore - -本文档介绍如何在CPU环境的Windows系统上快速安装MindSpore。 - - - -- [Windows系统安装MindSpore](#windows系统安装mindspore) - - [环境要求](#环境要求) - - [系统要求和软件依赖](#系统要求和软件依赖) - - [Conda安装(可选)](#conda安装可选) - - [安装指南](#安装指南) - - [通过可执行文件安装](#通过可执行文件安装) - - [从源码编译安装](#从源码编译安装) - - - - - -## 环境要求 - -### 系统要求和软件依赖 - -| 版本号 | 操作系统 | 可执行文件安装依赖 | 源码编译安装依赖 | -| ---- | :--- | :--- | :--- | -| MindSpore master | Windows 10 x86_64 | - [Python](https://www.python.org/downloads/) 3.7.5
- 其他依赖项参见[requirements.txt](https://gitee.com/mindspore/mindspore/blob/master/requirements.txt) | **编译依赖:**
- [Python](https://www.python.org/downloads/) 3.7.5
- [MinGW-W64 GCC-7.3.0](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/7.3.0/threads-posix/seh/x86_64-7.3.0-release-posix-seh-rt_v5-rev0.7z) x86_64-posix-seh
- [ActivePerl](http://downloads.activestate.com/ActivePerl/releases/5.24.3.2404/ActivePerl-5.24.3.2404-MSWin32-x64-404865.exe) 5.24.3.2404
- [CMake](https://cmake.org/download/) 3.14.1
- [wheel](https://pypi.org/project/wheel/) >= 0.32.0
**安装依赖:**
与可执行文件安装依赖相同 | - -- 在联网状态下,安装whl包时会自动下载requirements.txt中的依赖项,其余情况需自行安装。 - -### Conda安装(可选) - -1. Conda安装包下载路径如下。 - - - [X86 Anaconda](https://www.anaconda.com/distribution/) 或 [X86 Miniconda](https://docs.conda.io/en/latest/miniconda.html) - -2. 安装后从Windows开始菜单打开Anaconda Prompt。 -3. 创建并激活Python环境。 - - ```bash - conda create -n {your_env_name} python=3.7.5 - conda activate {your_env_name} - ``` - -> Conda是强大的Python环境管理工具,建议初学者上网查阅更多资料。 - -## 安装指南 - -### 通过可执行文件安装 - -1. 从[MindSpore网站下载地址](https://www.mindspore.cn/versions)下载whl包,建议先进行SHA-256完整性校验,执行如下命令安装MindSpore。 - - ```bash - pip install mindspore-{version}-cp37-cp37m-win_{arch}.whl - ``` - -2. 执行如下命令,如果没有提示`No module named 'mindspore'`等加载错误的信息,则说明安装成功。 - - ```bash - python - import mindspore - ``` - -### 从源码编译安装 - -1. 从代码仓下载源码。 - - ```bash - git clone https://gitee.com/mindspore/mindspore.git - ``` - -2. 在源码根目录下执行如下命令编译MindSpore。 - - ```bash - call build.bat - ``` - > - 在执行上述命令前,需保证mingw64\bin\路径和可执行文件cmake所在路径已加入环境变量PATH中。 - > - build.sh中会执行git clone获取第三方依赖库的代码,请提前确保git的网络设置正确可用。 - > - 如果编译机性能较好,可在执行中增加-j{线程数}来增加线程数量(默认为6)。如`call build.bat 12`。 - > - 在执行上述命令前,需保证已安装[Visual C++ Redistributable for Visual Studio 2015](https://www.microsoft.com/zh-CN/download/details.aspx?id=48145)。 - -3. 执行如下命令安装MindSpore。 - - ```bash - pip install build/package/mindspore-{version}-cp37-cp37m-win_{arch}.whl - ``` - -4. 执行如下命令,如果没有提示`No module named 'mindspore'`等加载错误的信息,则说明安装成功。 - - ```bash - python - import mindspore - ``` diff --git a/tutorials/source_zh_cn/index.rst b/tutorials/source_zh_cn/index.rst index 0fa28a2e556dfc0566896f553226e97af000913b..69d0866d1367b71953f3e38f5fb0fae59a876d29 100644 --- a/tutorials/source_zh_cn/index.rst +++ b/tutorials/source_zh_cn/index.rst @@ -20,25 +20,52 @@ MindSpore教程 :caption: 使用指南 use/data_preparation/data_preparation + use/defining_the_network use/saving_and_loading_model_parameters - use/debugging_in_pynative_mode .. toctree:: :glob: :maxdepth: 1 - :caption: 进阶使用 + :caption: 应用实践 - advanced_use/visualization_tutorials - advanced_use/mixed_precision - advanced_use/distributed_training advanced_use/computer_vision_application advanced_use/nlp_application - advanced_use/custom_operator + +.. toctree:: + :glob: + :maxdepth: 1 + :caption: 模型调优 + + advanced_use/debugging_in_pynative_mode advanced_use/customized_debugging_information + advanced_use/visualization_tutorials + +.. toctree:: + :glob: + :maxdepth: 1 + :caption: 性能优化 + + advanced_use/distributed_training_tutorials + advanced_use/mixed_precision + +.. toctree:: + :glob: + :maxdepth: 1 + :caption: 端云使用 + advanced_use/use_on_the_cloud advanced_use/on_device_inference - advanced_use/model_security + +.. toctree:: + :glob: + :maxdepth: 1 + :caption: 网络迁移 + advanced_use/network_migration - advanced_use/checkpoint_for_hybrid_parallel - advanced_use/mindspore_cpu_win_install - advanced_use/community + +.. toctree:: + :glob: + :maxdepth: 1 + :caption: AI安全 + + advanced_use/model_security diff --git a/tutorials/source_zh_cn/advanced_use/custom_operator.md b/tutorials/source_zh_cn/use/custom_operator.md similarity index 99% rename from tutorials/source_zh_cn/advanced_use/custom_operator.md rename to tutorials/source_zh_cn/use/custom_operator.md index 6f5e99b4cee0a893692a1f07a8c4e5144940aa12..1a40e68050b9426c28e222f6897ba3a125598fc1 100644 --- a/tutorials/source_zh_cn/advanced_use/custom_operator.md +++ b/tutorials/source_zh_cn/use/custom_operator.md @@ -14,7 +14,7 @@ - + ## 概述 diff --git a/tutorials/source_zh_cn/use/defining_the_network.rst b/tutorials/source_zh_cn/use/defining_the_network.rst new file mode 100644 index 0000000000000000000000000000000000000000..4f875363bfa03c4477c87a980e3b04f87e29c1e2 --- /dev/null +++ b/tutorials/source_zh_cn/use/defining_the_network.rst @@ -0,0 +1,7 @@ +定义网络 +=========== + +.. toctree:: + :maxdepth: 1 + + custom_operator \ No newline at end of file