提交 58154e4d 编写于 作者: J JunYuLiu

modify markdown

上级 7339173f
......@@ -181,7 +181,7 @@ A: ModelArts is an online training and inference platform on HUAWEI CLOUD. MindS
Q: Does MindSpore support Windows 10?
A: The MindSpore CPU version can be installed on Windows 10. For details about the installation procedure, please refer to the [MindSpore official website tutorial](https://www.mindspore.cn/tutorial/zh-CN/r0.7/advanced_use/mindspore_cpu_win_install.html)
A: The MindSpore CPU version can be installed on Windows 10. For details about the installation procedure, please refer to the [MindSpore official website tutorial](https://www.mindspore.cn/install/en)
## Backend Running
......
......@@ -144,7 +144,7 @@ A:MindSpore针对典型场景均有模型训练支持,支持情况详见[Rel
Q:MindSpore有哪些现成的推荐类或生成类网络或模型可用?
A:目前正在开发Wide & Deep、DeepFM、NCF等推荐类模型,NLP领域已经支持Bert_NEZHA,正在开发MASS等模型,用户可根据场景需要改造为生成类网络,可以关注[MindSpore Model Zoo](https://gitee.com/mindspore/mindspore/tree/r0.7/mindspore/model_zoo)
A:目前正在开发Wide & Deep、DeepFM、NCF等推荐类模型,NLP领域已经支持Bert_NEZHA,正在开发MASS等模型,用户可根据场景需要改造为生成类网络,可以关注[MindSpore Model Zoo](https://gitee.com/mindspore/mindspore/tree/r0.7/model_zoo)
<br/>
......@@ -180,7 +180,7 @@ A:ModelArts是华为公有云线上训练及推理平台,MindSpore是华为
Q:MindSpore是否支持Windows 10?
A:MindSpore CPU版本已经支持在Windows 10系统中安装,具体安装步骤可以查阅[MindSpore官网教程](https://www.mindspore.cn/tutorial/zh-CN/r0.7/advanced_use/mindspore_cpu_win_install.html)
A:MindSpore CPU版本已经支持在Windows 10系统中安装,具体安装步骤可以查阅[MindSpore官网教程](https://www.mindspore.cn/install/)
## 后端运行
......
......@@ -178,7 +178,7 @@ A: ModelArts is an online training and inference platform on HUAWEI CLOUD. MindS
Q: Does MindSpore support Windows 10?
A: The MindSpore CPU version can be installed on Windows 10. For details about the installation procedure, please refer to the [MindSpore official website tutorial](https://www.mindspore.cn/tutorial/zh-CN/master/advanced_use/mindspore_cpu_win_install.html)
A: The MindSpore CPU version can be installed on Windows 10. For details about the installation procedure, please refer to the [MindSpore official website tutorial](https://www.mindspore.cn/install/en)
## Backend Running
......
......@@ -141,7 +141,7 @@ A:MindSpore针对典型场景均有模型训练支持,支持情况详见[Rel
Q:MindSpore有哪些现成的推荐类或生成类网络或模型可用?
A:目前正在开发Wide & Deep、DeepFM、NCF等推荐类模型,NLP领域已经支持Bert_NEZHA,正在开发MASS等模型,用户可根据场景需要改造为生成类网络,可以关注[MindSpore Model Zoo](https://gitee.com/mindspore/mindspore/tree/master/mindspore/model_zoo)
A:目前正在开发Wide & Deep、DeepFM、NCF等推荐类模型,NLP领域已经支持Bert_NEZHA,正在开发MASS等模型,用户可根据场景需要改造为生成类网络,可以关注[MindSpore Model Zoo](https://gitee.com/mindspore/mindspore/tree/master/model_zoo)
<br/>
......@@ -177,7 +177,7 @@ A:ModelArts是华为公有云线上训练及推理平台,MindSpore是华为
Q:MindSpore是否支持Windows 10?
A:MindSpore CPU版本已经支持在Windows 10系统中安装,具体安装步骤可以查阅[MindSpore官网教程](https://www.mindspore.cn/tutorial/zh-CN/master/advanced_use/mindspore_cpu_win_install.html)
A:MindSpore CPU版本已经支持在Windows 10系统中安装,具体安装步骤可以查阅[MindSpore官网教程](https://www.mindspore.cn/install/)
## 后端运行
......
......@@ -112,9 +112,9 @@ MindSpore为用户提供了多种数据加载方式,其中包括常用数据
![title](./images/data_loading_performance_scheme.png)
数据加载性能优化建议如下:
- 已经支持的数据集格式优选内置加载算子,具体内容请参考[内置加载算子](https://www.mindspore.cn/api/zh-CN/r0.7/api/python/mindspore/mindspore.dataset.html),如果性能仍无法满足需求,则可采取多线程并发方案,请参考本文[多线程优化方案](#多线程优化方案)
- 不支持的数据集格式,优选转换为MindSpore数据格式后再使用`MindDataset`类进行加载,具体内容请参考[将数据集转换为MindSpore数据格式](https://www.mindspore.cn/tutorial/zh-CN/r0.7/use/data_preparation/converting_datasets.html),如果性能仍无法满足需求,则可采取多线程并发方案,请参考本文[多线程优化方案](#多线程优化方案)
- 不支持的数据集格式,算法快速验证场景,优选用户自定义`GeneratorDataset`类实现,如果性能仍无法满足需求,则可采取多进程并发方案,请参考本文[多进程优化方案](#多进程优化方案)
- 已经支持的数据集格式优选内置加载算子,具体内容请参考[内置加载算子](https://www.mindspore.cn/api/zh-CN/r0.7/api/python/mindspore/mindspore.dataset.html),如果性能仍无法满足需求,则可采取多线程并发方案,请参考本文[多线程优化方案](#id16)
- 不支持的数据集格式,优选转换为MindSpore数据格式后再使用`MindDataset`类进行加载,具体内容请参考[将数据集转换为MindSpore数据格式](https://www.mindspore.cn/tutorial/zh-CN/r0.7/use/data_preparation/converting_datasets.html),如果性能仍无法满足需求,则可采取多线程并发方案,请参考本文[多线程优化方案](#id16)
- 不支持的数据集格式,算法快速验证场景,优选用户自定义`GeneratorDataset`类实现,如果性能仍无法满足需求,则可采取多进程并发方案,请参考本文[多进程优化方案](#id17)
### 代码示例
......@@ -133,7 +133,7 @@ MindSpore为用户提供了多种数据加载方式,其中包括常用数据
```
输出:
```
{'image': array([[[235, 235, 235],
[230, 230, 230],
[234, 234, 234],
......@@ -145,7 +145,7 @@ MindSpore为用户提供了多种数据加载方式,其中包括常用数据
[120, 120, 119],
[146, 146, 146],
[177, 174, 190]]], dtype=uint8), 'label': array(9, dtype=uint32)}
```
2. 使用`Cifar10ToMR`这个类将CIFAR-10数据集转换为MindSpore数据格式,这里使用的是CIFAR-10 python文件格式的数据集,然后使用`MindDataset`类加载MindSpore数据格式数据集,加载数据采取多线程优化方案,开启了4个线程并发完成任务,最后对数据创建了字典迭代器,并通过迭代器读取了一条数据记录。
......@@ -167,9 +167,9 @@ MindSpore为用户提供了多种数据加载方式,其中包括常用数据
```
输出:
```
{'data': array([255, 216, 255, ..., 63, 255, 217], dtype=uint8), 'id': array(30474, dtype=int64), 'label': array(2, dtype=int64)}
```
3. 使用`GeneratorDataset`类加载自定义数据集,并且采取多进程优化方案,开启了4个进程并发完成任务,最后对数据创建了字典迭代器,并通过迭代器读取了一条数据记录。
......@@ -186,9 +186,9 @@ MindSpore为用户提供了多种数据加载方式,其中包括常用数据
```
输出:
```
{'data': array([0], dtype=int64)}
```
## shuffle性能优化
......@@ -219,7 +219,7 @@ shuffle性能优化建议如下:
```
输出:
```
{'image': array([[[254, 254, 254],
[255, 255, 254],
[255, 255, 254],
......@@ -231,7 +231,7 @@ shuffle性能优化建议如下:
[ 64, 61, 63],
[ 63, 58, 60],
[ 61, 56, 58]]], dtype=uint8), 'label': array(9, dtype=uint32)}
```
2. 使用`shuffle`函数进行数据混洗,参数`buffer_size`设置为3,数据采用`GeneratorDataset`类自定义生成。
......@@ -253,7 +253,7 @@ shuffle性能优化建议如下:
```
输出:
```
before shuffle:
[0 1 2 3 4]
[1 2 3 4 5]
......@@ -266,7 +266,7 @@ shuffle性能优化建议如下:
[4 5 6 7 8]
[1 2 3 4 5]
[3 4 5 6 7]
```
## 数据增强性能优化
......@@ -289,10 +289,10 @@ shuffle性能优化建议如下:
数据增强性能优化建议如下:
- 优先使用`c_transforms`模块进行数据增强,因为性能最高,如果性能仍无法满足需求,可采取[多线程优化方案](#多线程优化方案)[Compose优化方案](#Compose优化方案)或者[算子融合优化方案](#算子融合优化方案)
- 如果使用了`py_transforms`模块进行数据增强,当性能仍无法满足需求,可采取[多线程优化方案](#多线程优化方案)[多进程优化方案](#多进程优化方案)[Compose优化方案](#Compose优化方案)或者[算子融合优化方案](#算子融合优化方案)
- 优先使用`c_transforms`模块进行数据增强,因为性能最高,如果性能仍无法满足需求,可采取[多线程优化方案](#id16)[Compose优化方案](#compose)或者[算子融合优化方案](#id18)
- 如果使用了`py_transforms`模块进行数据增强,当性能仍无法满足需求,可采取[多线程优化方案](#id16)[多进程优化方案](#id17)[Compose优化方案](#compose)或者[算子融合优化方案](#id18)
- `c_transforms`模块是在C++内维护buffer管理,`py_transforms`模块是在Python内维护buffer管理。因为Python和C++切换的性能成本,建议不要混用算子。
- 如果用户使用了自定义Python函数进行数据增强,当性能仍无法满足需求,可采取[多线程优化方案](#多线程优化方案)或者[多进程优化方案](#多进程优化方案),如果还是无法提升性能,就需要对自定义的Python代码进行优化。
- 如果用户使用了自定义Python函数进行数据增强,当性能仍无法满足需求,可采取[多线程优化方案](#id16)或者[多进程优化方案](#id17),如果还是无法提升性能,就需要对自定义的Python代码进行优化。
### 代码示例
......@@ -344,7 +344,7 @@ shuffle性能优化建议如下:
```
输出:
```
before map:
[0 1 2 3 4]
[1 2 3 4 5]
......@@ -357,7 +357,7 @@ shuffle性能优化建议如下:
[ 4 9 16 25 36]
[ 9 16 25 36 49]
[16 25 36 49 64]
```
## 性能优化方案总结
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册