diff --git a/tutorials/source_en/orange_pi/dev_start.md b/tutorials/source_en/orange_pi/dev_start.md index 0c0cedaaf229d06cd18d12761f398723e60eb4a8..708cc9be0c18d75f69339ee274e837a7ee30fcc0 100644 --- a/tutorials/source_en/orange_pi/dev_start.md +++ b/tutorials/source_en/orange_pi/dev_start.md @@ -1,6 +1,6 @@ # Quick Start -[![View Source On Gitee](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/resource/_static/logo_source_en.svg)](https://gitee.com/mindspore/docs/blob/r2.6.0/tutorials/source_en/orange_pi/dev_start.md) +[![View Source On Gitee](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source_en.svg)](https://gitee.com/mindspore/docs/blob/master/tutorials/source_en/orange_pi/dev_start.md) Since developers may perform custom model and case development in OrangePi AIpro (hereinafter: OrangePi Development Board), this chapter illustrates the development considerations in the OrangePi Development Board through a handwritten digit recognition case based on MindSpore. @@ -8,22 +8,22 @@ Since developers may perform custom model and case development in OrangePi AIpro After obtaining the OrangePi AIpro development board, developers first need to confirm hardware resources, burn images, and upgrade CANN and MindSpore versions before running the case. The specific steps are as follows: -- Hardware: OrangePi AIpro 16G 8-12T development board -- Image: OrangePi AIpro official Ubuntu image -- CANN: 8.0.RC3.alpha002 -- MindSpore: 2.4.10 +| OrangePi AIpro | Image | CANN Toolkit/Kernels | MindSpore | +| :----:| :----: | :----:| :----: | +| 8T 16G | Ubuntu | 8.0.RC3.alpha002| 2.4.10 | +| 8T 16G | Ubuntu | 8.0.0beta1| 2.5.0 | ### Image Burning -To run this case, it is necessary to burn the Ubuntu image on the OrangePi AIpro official website. Please refer to [Image Burning](https://www.mindspore.cn/tutorials/en/r2.6.0/orange_pi/environment_setup.html#1-image-burning-taking-windows-as-an-example). +To run this case, it is necessary to burn the Ubuntu image on the OrangePi AIpro official website. Please refer to [Image Burning](https://www.mindspore.cn/tutorials/en/master/orange_pi/environment_setup.html#1-image-burning-taking-windows-as-an-example). ### CANN Upgrading - Please refer to [CANN Upgrading](https://www.mindspore.cn/tutorials/en/r2.6.0/orange_pi/environment_setup.html#3-cann-upgrading). + Please refer to [CANN Upgrading](https://www.mindspore.cn/tutorials/en/master/orange_pi/environment_setup.html#3-cann-upgrading). ### MindSpore Upgrading - Please refer to [MindSpore Upgrading](https://www.mindspore.cn/tutorials/en/r2.6.0/orange_pi/environment_setup.html#4-mindspore-upgrading). + Please refer to [MindSpore Upgrading](https://www.mindspore.cn/tutorials/en/master/orange_pi/environment_setup.html#4-mindspore-upgrading). ```python from mindspore import nn @@ -50,7 +50,7 @@ mindspore.set_context(max_device_memory="2GB", mode=mindspore.GRAPH_MODE, device ## Preparing and Loading Dataset -MindSpore provides a Pipeline-based [data engine](https://www.mindspore.cn/docs/en/r2.6.0/design/data_engine.html) to realize efficient data preprocessing through [data loading and processing](https://www.mindspore.cn/tutorials/en/r2.6.0/beginner/dataset.html) to realize efficient data preprocessing. In this case, we use the Mnist dataset, which is automatically downloaded and then preprocessed using the data transforms provided by `mindspore.dataset`. +MindSpore provides a Pipeline-based [data engine](https://www.mindspore.cn/docs/en/master/design/data_engine.html) to realize efficient data preprocessing through [data loading and processing](https://www.mindspore.cn/tutorials/en/master/beginner/dataset.html) to realize efficient data preprocessing. In this case, we use the Mnist dataset, which is automatically downloaded and then preprocessed using the data transforms provided by `mindspore.dataset`. ```python #install download @@ -127,7 +127,7 @@ train_dataset = datapipe(train_dataset, 64) test_dataset = datapipe(test_dataset, 64) ``` -The dataset can be accessed iteratively using [create_tuple_iterator](https://www.mindspore.cn/docs/en/r2.6.0/api_python/dataset/dataset_method/iterator/mindspore.dataset.Dataset.create_tuple_iterator.html) or [create_dict_iterator](https://www.mindspore.cn/docs/en/r2.6.0/api_python/dataset/dataset_method/iterator/mindspore.dataset.Dataset.create_dict_iterator.html) to see the shape and datatype of the data and labels. +The dataset can be accessed iteratively using [create_tuple_iterator](https://www.mindspore.cn/docs/en/master/api_python/dataset/dataset_method/iterator/mindspore.dataset.Dataset.create_tuple_iterator.html) or [create_dict_iterator](https://www.mindspore.cn/docs/en/master/api_python/dataset/dataset_method/iterator/mindspore.dataset.Dataset.create_dict_iterator.html) to see the shape and datatype of the data and labels. ```python for image, label in test_dataset.create_tuple_iterator(): @@ -202,8 +202,8 @@ In model training, a complete training process (STEP) requires the realization o MindSpore uses a functional automatic differentiation mechanism, so for the above steps need to be implemented: 1. Define the forward computation function. -2. Use [value_and_grad](https://www.mindspore.cn/docs/en/r2.6.0/api_python/mindspore/mindspore.value_and_grad.html) to obtain the gradient computation function by functional transformation. -3. Define the training function and use [set_train](https://www.mindspore.cn/docs/en/r2.6.0/api_python/nn/mindspore.nn.Cell.html#mindspore.nn.Cell.set_train) to set to training mode, perform forward computation, backpropagation and parameter optimization. +2. Use [value_and_grad](https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.value_and_grad.html) to obtain the gradient computation function by functional transformation. +3. Define the training function and use [set_train](https://www.mindspore.cn/docs/en/master/api_python/nn/mindspore.nn.Cell.html#mindspore.nn.Cell.set_train) to set to training mode, perform forward computation, backpropagation and parameter optimization. ```python # Instantiate loss function and optimizer diff --git a/tutorials/source_en/orange_pi/environment_setup.md b/tutorials/source_en/orange_pi/environment_setup.md index 116d3fafa3202b323e2c142491abc7358003de46..c33908c621b054dba57e47d698c3f6c0dd55e8f2 100644 --- a/tutorials/source_en/orange_pi/environment_setup.md +++ b/tutorials/source_en/orange_pi/environment_setup.md @@ -1,6 +1,6 @@ # Environment Setup Guide -[![View Source On Gitee](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/resource/_static/logo_source_en.svg)](https://gitee.com/mindspore/docs/blob/r2.6.0/tutorials/source_en/orange_pi/environment_setup.md) +[![View Source On Gitee](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source_en.svg)](https://gitee.com/mindspore/docs/blob/master/tutorials/source_en/orange_pi/environment_setup.md) This section describes how to burn an image on OrangePi AIpro, customize the installation of CANN and MindSpore, and configure the runtime environment. @@ -12,7 +12,7 @@ Image burning can be performed in any operating system. Here we will take Window Step 1 Insert the Micro SD card into the card reader and the card reader into the PC. -![environment-setup-1-1](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-1.jpg) +![environment-setup-1-1](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-1.jpg) ### 1.2 Downloading the Ubuntu image @@ -22,11 +22,11 @@ Step 1 Click [here](http://www.orangepi.cn/html/hardWare/computerAndMicrocontrol Step 2 Click the arrow icon in the picture to jump to the Baidu Wangpan download page. -![environment-setup-1-2](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-2.png) +![environment-setup-1-2](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-2.png) Step 3 Select the desktop version to download, it is recommended to download the 0318 version of the environment. -![environment-setup-1-3](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-3.png) +![environment-setup-1-3](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-3.png) Step 4 Alternative download method. @@ -42,13 +42,13 @@ There are two card-making tools balenaEtcher, Rufus, and you can choose any one Click [here](https://etcher.balena.io/) to jump to the official website, and click the green download button to jump to where the software is downloaded. - ![environment-setup-1-4](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-4.png) + ![environment-setup-1-4](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-4.png) Step 2 Select to download the Portable version. The Portable version does not require installation, so double-click it to open it and use it. - ![environment-setup-1-5](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-5.png) + ![environment-setup-1-5](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-5.png) Step 3 Alternative download method. @@ -56,9 +56,9 @@ There are two card-making tools balenaEtcher, Rufus, and you can choose any one Step 4 Open balenaEtcher. - ![environment-setup-1-6](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-6.png) + ![environment-setup-1-6](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-6.png) - ![environment-setup-1-7](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-7.png) + ![environment-setup-1-7](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-7.png) - Rufus: @@ -80,19 +80,19 @@ Here we introduce balenaEtcher, Rufus to burn the image, you can burn according 3. Click Start Burning, as shown below: - ![environment-setup-1-8](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-8.png) + ![environment-setup-1-8](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-8.png) It takes about 20 minutes to burn and verify, so please be patient: - ![environment-setup-1-9](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-9.png) + ![environment-setup-1-9](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-9.png) - ![environment-setup-1-10](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-10.png) + ![environment-setup-1-10](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-10.png) Step 2 Burning is complete. After the completion of burning, balenaEtcher is shown in the following figure, if the green indicator icon shows that the image is burned successfully, at this time you can exit balenaEtcher, pull out the TF card and insert it into the TF card slot on the development board to use: - ![environment-setup-1-11](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-11.png) + ![environment-setup-1-11](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-11.png) - Rufus burns images: @@ -100,13 +100,13 @@ Here we introduce balenaEtcher, Rufus to burn the image, you can burn according Insert the sd card into the card reader, insert the card reader into the computer, select the image and sd card, click “Start”. - ![environment-setup-1-12](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-12.png) + ![environment-setup-1-12](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-12.png) Step 2 Burning is complete. Pull out the card reader directly after the wait is over. - ![environment-setup-1-13](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-13.png) + ![environment-setup-1-13](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-13.png) ## 2. Development Board Startup and Network Connection @@ -162,7 +162,7 @@ If the current CANN version does not meet the development requirements, the CANN Step 1 Use the `CTRL+ALT+T` or click on the icon with `$_` at the bottom of the page to open the terminal and switch to the root user. -![environment-setup-1-14](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-14.png) +![environment-setup-1-14](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-14.png) Switch the root user, root user password: Mind@123. @@ -185,7 +185,7 @@ Step 2 Remove installed CANN packages to free up disk space and prevent installi ``` -Step 3 Open the official website of Ascend CANN to access the community version of the resource [download address](https://www.hiascend.com/developer/download/community/result?module=cann), download the required version of the toolkit package. Taking 8.0.RC3.alpha002 version as an example, as shown below: +Step 3 Open the official website of Ascend CANN to access the community version of the resource [download address](https://www.hiascend.com/developer/download/community/result?module=cann), download the required version of the toolkit package. Taking 8.0.0.beta1 version as an example, as shown below: ![environment-setup-1-15](../../source_zh_cn/orange_pi/images/environment_setup_1-15.png) @@ -206,18 +206,18 @@ Step 4 Go to the Toolkit package download directory. Step 5 Add execution permissions to the CANN package. ```bash -(base) root@orangepiaipro: /home/HwHiAiUser/Downloads# chmod +x ./Ascend-cann-toolkit_8.0.RC3.alpha002_linux-aarch64.run +(base) root@orangepiaipro: /home/HwHiAiUser/Downloads# chmod +x ./Ascend-cann-toolkit_8.0.0_linux-aarch64.run ``` Step 6 Execute the following command to upgrade the software. ```bash -(base) root@orangepiaipro: /home/HwHiAiUser/Downloads#./Ascend-cann-toolkit_8.0.RC3.alpha002_linux-aarch64.run --install +(base) root@orangepiaipro: /home/HwHiAiUser/Downloads#./Ascend-cann-toolkit_8.0.0_linux-aarch64.run --install ``` Type Y when this prompt pops up during installation, then press Enter to continue the installation. This process takes about 10-15 minutes, please be patient. -![environment-setup-1-16](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-16.png) +![environment-setup-1-16](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-16.png) After the upgrade is completed, if the following message is displayed, the software upgrade is successful: @@ -279,13 +279,15 @@ Step 4 Go to the Kernels package download directory. Step 5 Add execution permissions to the kernels package. ```bash -(base) root@orangepiaipro: /home/HwHiAiUser/Downloads# chmod +x ./Ascend-cann-kernels-310b_8.0.RC3.alpha002_linux.run +(base) root@orangepiaipro: /home/HwHiAiUser/Downloads# chmod +x ./ +Ascend-cann-kernels-310b_8.0.0_linux-aarch64.run ``` Step 6 Execute the following command to upgrade the software. ```bash -(base) root@orangepiaipro: /home/HwHiAiUser/Downloads#./Ascend-cann-kernels-310b_8.0.RC3.alpha002_linux.run --install +(base) root@orangepiaipro: /home/HwHiAiUser/Downloads#./ +Ascend-cann-kernels-310b_8.0.0_linux-aarch64.run --install ``` After the upgrade is completed, if the following message is displayed, the software upgrade is successful: @@ -316,7 +318,7 @@ Step 2 Execute the following command to obtain version information. If the current MindSpore version does not meet the development requirements, the MindSpore version can be upgraded according to the following methods. -### 4.2 Installing the Official Version of the Website (Taking MindSpore 2.4.10 as an example) +### 4.2 Installing the Official Version of the Website (Taking MindSpore 2.5.0 as an example) #### 4.2.1 MindSpore Upgrading @@ -325,13 +327,13 @@ Please note that both installation methods for MindSpore need to be performed un Method 1: Use the CTRL+ALT+T shortcut key or click on the icon with $_ at the bottom of the page to open the terminal, keep the HwHiAiUser user logged in, and run the pip install command directly on the terminal. ```bash -(base) HwHiAiUser@orangepiaipro:~$ pip install mindspore==2.4.10 +(base) HwHiAiUser@orangepiaipro:~$ pip install mindspore==2.5.0 ``` Method 2: Use the CTRL+ALT+T shortcut key or click on the icon with $_ at the bottom of the page to open the terminal, refer to [MindSpore official website installation tutorial](https://www.mindspore.cn/install/en) to install. ```bash -(base) HwHiAiUser@orangepiaipro:~$ pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.4.10/MindSpore/unified/aarch64/mindspore-2.4.10-cp39-cp39-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple +(base) HwHiAiUser@orangepiaipro:~$ pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.5.0/MindSpore/unified/aarch64/mindspore-2.5.0-cp39-cp39-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple # Confirm the operating system and programming language, and the default environment of the OrangePi AIpro development board is linux-aarch64 and python3.9 ``` @@ -345,7 +347,7 @@ Method 2: Use the CTRL+ALT+T shortcut key or click on the icon with $_ at the bo If the output is as follows, it indicates that MindSpore has been successfully installed. ```bash -MindSpore version: 2.4.10 +MindSpore version: 2.5.0 The result of multiplication calculation is correct, MindSpore has been installed on platform [Ascend] successfully! ``` @@ -353,4 +355,4 @@ The result of multiplication calculation is correct, MindSpore has been installe ## Next Suggestion -At this point, the OrangePi AIpro development board environment has been set up, and you can experience [online model inference based on MindSpore development on the development board](https://www.mindspore.cn/tutorials/en/r2.6.0/orange_pi/model_infer.html). +At this point, the OrangePi AIpro development board environment has been set up, and you can experience [online model inference based on MindSpore development on the development board](https://www.mindspore.cn/tutorials/en/master/orange_pi/model_infer.html). diff --git a/tutorials/source_zh_cn/orange_pi/dev_start.ipynb b/tutorials/source_zh_cn/orange_pi/dev_start.ipynb index 2557d183f6d3ae9599b7aafa0df553e70fa0fafa..ebf0f7a794920b47000ff15d281b21002f24a2e0 100644 --- a/tutorials/source_zh_cn/orange_pi/dev_start.ipynb +++ b/tutorials/source_zh_cn/orange_pi/dev_start.ipynb @@ -6,7 +6,7 @@ "source": [ "# 开发入门\n", "\n", - "[![下载Notebook](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/resource/_static/logo_notebook.svg)](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/notebook/r2.6.0/tutorials/zh_cn/orange_pi/mindspore_dev_start.ipynb) [![下载样例代码](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/resource/_static/logo_download_code.svg)](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/notebook/r2.6.0/tutorials/zh_cn/orange_pi/mindspore_dev_start.py) [![查看源文件](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/resource/_static/logo_source.svg)](https://gitee.com/mindspore/docs/blob/r2.6.0/tutorials/source_zh_cn/orange_pi/dev_start.ipynb)\n", + "[![下载Notebook](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_notebook.svg)](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/notebook/master/tutorials/zh_cn/orange_pi/mindspore_dev_start.ipynb) [![下载样例代码](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_download_code.svg)](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/notebook/master/tutorials/zh_cn/orange_pi/mindspore_dev_start.py) [![查看源文件](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg)](https://gitee.com/mindspore/docs/blob/master/tutorials/source_zh_cn/orange_pi/dev_start.ipynb)\n", "\n", "因开发者可能会在OrangePi AIpro(下称:香橙派开发板)进行自定义模型和案例开发,本章节通过基于MindSpore的手写数字识别案例,说明香橙派开发板中的开发注意事项。" ] @@ -19,22 +19,22 @@ "\n", "开发者拿到香橙派开发板后,首先需要进行硬件资源确认、镜像烧录以及CANN和MindSpore版本的升级,才可运行该案例,具体如下:\n", "\n", - "- 硬件:香橙派AIpro 16G 8-12T开发板\n", - "- 镜像:香橙派官网Ubuntu镜像\n", - "- CANN:8.0.RC3.alpha002\n", - "- MindSpore:2.4.10\n", + "| 香橙派AIpro | 镜像 | CANN Toolkit/Kernels | MindSpore |\n", + "| :----:| :----: | :----:| :----: |\n", + "| 8T 16G | Ubuntu | 8.0.RC3.alpha002| 2.4.10 |\n", + "| 8T 16G | Ubuntu | 8.0.0beta1| 2.5.0 |\n", "\n", "### 镜像烧录\n", "\n", - "运行该案例需要烧录香橙派官网Ubuntu镜像,参考[镜像烧录](https://www.mindspore.cn/tutorials/zh-CN/r2.6.0/orange_pi/environment_setup.html#1-%E9%95%9C%E5%83%8F%E7%83%A7%E5%BD%95%E4%BB%A5windows%E7%B3%BB%E7%BB%9F%E4%B8%BA%E4%BE%8B)章节。\n", + "运行该案例需要烧录香橙派官网Ubuntu镜像,参考[镜像烧录](https://www.mindspore.cn/tutorials/zh-CN/master/orange_pi/environment_setup.html#1-%E9%95%9C%E5%83%8F%E7%83%A7%E5%BD%95%E4%BB%A5windows%E7%B3%BB%E7%BB%9F%E4%B8%BA%E4%BE%8B)章节。\n", "\n", "### CANN升级\n", "\n", - "参考[CANN升级](https://www.mindspore.cn/tutorials/zh-CN/r2.6.0/orange_pi/environment_setup.html#3-cann%E5%8D%87%E7%BA%A7)章节。\n", + "参考[CANN升级](https://www.mindspore.cn/tutorials/zh-CN/master/orange_pi/environment_setup.html#3-cann%E5%8D%87%E7%BA%A7)章节。\n", "\n", "### MindSpore升级\n", "\n", - "参考[MindSpore升级](https://www.mindspore.cn/tutorials/zh-CN/r2.6.0/orange_pi/environment_setup.html#4-mindspore%E5%8D%87%E7%BA%A7)章节。" + "参考[MindSpore升级](https://www.mindspore.cn/tutorials/zh-CN/master/orange_pi/environment_setup.html#4-mindspore%E5%8D%87%E7%BA%A7)章节。" ] }, { @@ -98,7 +98,7 @@ "source": [ "## 数据集准备与加载\n", "\n", - "MindSpore提供基于Pipeline的[数据引擎](https://www.mindspore.cn/docs/zh-CN/r2.6.0/design/data_engine.html),通过[数据集(Dataset)](https://www.mindspore.cn/tutorials/zh-CN/r2.6.0/beginner/dataset.html)实现高效的数据预处理。在本案例中,我们使用Mnist数据集,自动下载完成后,使用`mindspore.dataset`提供的数据变换进行预处理。\n" + "MindSpore提供基于Pipeline的[数据引擎](https://www.mindspore.cn/docs/zh-CN/master/design/data_engine.html),通过[数据集(Dataset)](https://www.mindspore.cn/tutorials/zh-CN/master/beginner/dataset.html)实现高效的数据预处理。在本案例中,我们使用Mnist数据集,自动下载完成后,使用`mindspore.dataset`提供的数据变换进行预处理。\n" ] }, { @@ -252,7 +252,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "可使用[create_tuple_iterator](https://www.mindspore.cn/docs/zh-CN/r2.6.0/api_python/dataset/dataset_method/iterator/mindspore.dataset.Dataset.create_tuple_iterator.html) 或[create_dict_iterator](https://www.mindspore.cn/docs/zh-CN/r2.6.0/api_python/dataset/dataset_method/iterator/mindspore.dataset.Dataset.create_dict_iterator.html)对数据集进行迭代访问,查看数据和标签的shape和datatype。" + "可使用[create_tuple_iterator](https://www.mindspore.cn/docs/zh-CN/master/api_python/dataset/dataset_method/iterator/mindspore.dataset.Dataset.create_tuple_iterator.html) 或[create_dict_iterator](https://www.mindspore.cn/docs/zh-CN/master/api_python/dataset/dataset_method/iterator/mindspore.dataset.Dataset.create_dict_iterator.html)对数据集进行迭代访问,查看数据和标签的shape和datatype。" ] }, { @@ -374,8 +374,8 @@ "MindSpore使用函数式自动微分机制,因此针对上述步骤需要实现:\n", "\n", "1. 定义正向计算函数。\n", - "2. 使用[value_and_grad](https://www.mindspore.cn/docs/zh-CN/r2.6.0/api_python/mindspore/mindspore.value_and_grad.html)通过函数变换获得梯度计算函数。\n", - "3. 定义训练函数,使用[set_train](https://www.mindspore.cn/docs/zh-CN/r2.6.0/api_python/nn/mindspore.nn.Cell.html#mindspore.nn.Cell.set_train)设置为训练模式,执行正向计算、反向传播和参数优化。" + "2. 使用[value_and_grad](https://www.mindspore.cn/docs/zh-CN/master/api_python/mindspore/mindspore.value_and_grad.html)通过函数变换获得梯度计算函数。\n", + "3. 定义训练函数,使用[set_train](https://www.mindspore.cn/docs/zh-CN/master/api_python/nn/mindspore.nn.Cell.html#mindspore.nn.Cell.set_train)设置为训练模式,执行正向计算、反向传播和参数优化。" ] }, { @@ -674,7 +674,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.9" + "version": "3.9.0" }, "vscode": { "interpreter": { diff --git a/tutorials/source_zh_cn/orange_pi/environment_setup.md b/tutorials/source_zh_cn/orange_pi/environment_setup.md index cdb3a8a7bb8df904ec1a2bac4f9c6ac0cf693b23..2f424692e55456ad1fbfbea45655a3fdf2d86054 100644 --- a/tutorials/source_zh_cn/orange_pi/environment_setup.md +++ b/tutorials/source_zh_cn/orange_pi/environment_setup.md @@ -1,6 +1,6 @@ # 环境搭建指南 -[![查看源文件](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.6.0/resource/_static/logo_source.svg)](https://gitee.com/mindspore/docs/blob/r2.6.0/tutorials/source_zh_cn/orange_pi/environment_setup.md) +[![查看源文件](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg)](https://gitee.com/mindspore/docs/blob/master/tutorials/source_zh_cn/orange_pi/environment_setup.md) 本章节将介绍如何在OrangePi AIpro上烧录镜像,自定义安装CANN和MindSpore,并配置运行环境。 @@ -185,7 +185,7 @@ ``` -步骤3 打开昇腾CANN官网访问社区版资源[下载地址](https://www.hiascend.com/developer/download/community/result?module=cann),下载所需版本的toolkit包,该处以8.0.RC3.alpha002版本为例,如下图: +步骤3 打开昇腾CANN官网访问社区版资源[下载地址](https://www.hiascend.com/developer/download/community/result?module=cann),下载所需版本的toolkit包,该处以8.0.0.beta1版本为例,如下图: ![environment-setup-1-15](./images/environment_setup_1-15.png) @@ -206,13 +206,13 @@ 步骤5 给CANN包添加执行权限。 ```bash -(base) root@orangepiaipro: /home/HwHiAiUser/Downloads# chmod +x ./Ascend-cann-toolkit_8.0.RC3.alpha002_linux-aarch64.run +(base) root@orangepiaipro: /home/HwHiAiUser/Downloads# chmod +x ./Ascend-cann-toolkit_8.0.0_linux-aarch64.run ``` 步骤6 执行以下命令升级软件。 ```bash -(base) root@orangepiaipro: /home/HwHiAiUser/Downloads#./Ascend-cann-toolkit_8.0.RC3.alpha002_linux-aarch64.run --install +(base) root@orangepiaipro: /home/HwHiAiUser/Downloads#./Ascend-cann-toolkit_8.0.0_linux-aarch64.run --install ``` 安装时弹出此提示后输入Y,然后按回车键继续安装,该过程约需要10-15分钟,请耐心等待。 @@ -279,13 +279,13 @@ npu-smi info 步骤5 给kernels包添加执行权限。 ```bash -(base) root@orangepiaipro: /home/HwHiAiUser/Downloads# chmod +x ./Ascend-cann-kernels-310b_8.0.RC3.alpha002_linux.run +(base) root@orangepiaipro: /home/HwHiAiUser/Downloads# chmod +x ./Ascend-cann-kernels-310b_8.0.0_linux-aarch64.run ``` 步骤6 执行以下命令升级软件。 ```bash -(base) root@orangepiaipro: /home/HwHiAiUser/Downloads#./Ascend-cann-kernels-310b_8.0.RC3.alpha002_linux.run --install +(base) root@orangepiaipro: /home/HwHiAiUser/Downloads#./Ascend-cann-kernels-310b_8.0.0_linux-aarch64.run --install ``` 升级完成后,若显示如下信息,则说明软件升级成功: @@ -316,7 +316,7 @@ xxx install success 若当前MindSpore版本不满足开发需求,可按照如下内容对MindSpore版本进行升级。 -### 4.2 升级MindSpore(以MindSpore2.4.10为例) +### 4.2 升级MindSpore(以MindSpore2.5.0为例) #### 4.2.1 升级MindSpore @@ -325,13 +325,13 @@ xxx install success 方式一:使用CTRL+ALT+T快捷键或点击页面下方带有$_的图标打开终端,保持HwHiAiUser用户登录状态,在终端直接运行pip install命令。 ```bash -(base) HwHiAiUser@orangepiaipro:~$ pip install mindspore==2.4.10 +(base) HwHiAiUser@orangepiaipro:~$ pip install mindspore==2.5.0 ``` 方式二:使用CTRL+ALT+T快捷键或点击页面下方带有$_的图标打开终端,保持HwHiAiUser用户登录状态,参考[昇思MindSpore官网安装教程](https://www.mindspore.cn/install),在终端执行以下命令进行安装。 ```bash -(base) HwHiAiUser@orangepiaipro:~$ pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.4.10/MindSpore/unified/aarch64/mindspore-2.4.10-cp39-cp39-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple +(base) HwHiAiUser@orangepiaipro:~$ pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.5.0/MindSpore/unified/aarch64/mindspore-2.5.0-cp39-cp39-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple # 注意确认操作系统和编程语言,香橙派开发板默认环境下是linux-aarch64和python3.9 ``` @@ -347,7 +347,7 @@ xxx install success 如果输出如下,说明MindSpore安装成功了。 ```bash -MindSpore version: 2.4.10 +MindSpore version: 2.5.0 The result of multiplication calculation is correct, MindSpore has been installed on platform [Ascend] successfully! ``` @@ -355,4 +355,4 @@ The result of multiplication calculation is correct, MindSpore has been installe ## 下一步建议 -此时香橙派开发板环境搭建已经完成,可以在开发板上体验基于昇思MindSpore开发的[模型在线推理](https://www.mindspore.cn/tutorials/zh-CN/r2.6.0/orange_pi/model_infer.html)。 +此时香橙派开发板环境搭建已经完成,可以在开发板上体验基于昇思MindSpore开发的[模型在线推理](https://www.mindspore.cn/tutorials/zh-CN/master/orange_pi/model_infer.html)。 diff --git a/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-15.png b/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-15.png index 854e902585010622a6c1fe5ff1d7417aaf9c8841..78866fd792267238f84697adc13e66782bf40387 100644 Binary files a/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-15.png and b/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-15.png differ diff --git a/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-18.png b/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-18.png index 24ffe33d6c1cfd10a247be1a53a2b8018cbe0955..15b9ebfa767cf3f5fb85502dd1aff7d9a67d5fc3 100644 Binary files a/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-18.png and b/tutorials/source_zh_cn/orange_pi/images/environment_setup_1-18.png differ