提交 c4241d59 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!397 Modify document adaptation mindinsight.profiler Migrate to mindspore.profiler

Merge pull request !397 from zyhStack/zyh_doc
mindinsight.profiler
======================
.. automodule:: mindinsight.profiler
:members:
\ No newline at end of file
mindspore.profiler
==================
.. automodule:: mindspore.profiler
:members:
\ No newline at end of file
...@@ -28,9 +28,10 @@ MindSpore API ...@@ -28,9 +28,10 @@ MindSpore API
api/python/mindspore/mindspore.dataset.transforms api/python/mindspore/mindspore.dataset.transforms
api/python/mindspore/mindspore.dataset.transforms.vision api/python/mindspore/mindspore.dataset.transforms.vision
api/python/mindspore/mindspore.mindrecord api/python/mindspore/mindspore.mindrecord
api/python/mindspore/mindspore.profiler
api/python/mindinsight/mindinsight.lineagemgr api/python/mindinsight/mindinsight.lineagemgr
api/python/mindinsight/mindinsight.profiler
api/python/mindarmour/mindarmour api/python/mindarmour/mindarmour
api/python/mindarmour/mindarmour.utils api/python/mindarmour/mindarmour.utils
......
mindinsight.profiler
======================
.. automodule:: mindinsight.profiler
:members:
\ No newline at end of file
mindspore.profiler
==================
.. automodule:: mindspore.profiler
:members:
\ No newline at end of file
...@@ -28,9 +28,10 @@ MindSpore API ...@@ -28,9 +28,10 @@ MindSpore API
api/python/mindspore/mindspore.dataset.transforms api/python/mindspore/mindspore.dataset.transforms
api/python/mindspore/mindspore.dataset.transforms.vision api/python/mindspore/mindspore.dataset.transforms.vision
api/python/mindspore/mindspore.mindrecord api/python/mindspore/mindspore.mindrecord
api/python/mindspore/mindspore.profiler
api/python/mindinsight/mindinsight.lineagemgr api/python/mindinsight/mindinsight.lineagemgr
api/python/mindinsight/mindinsight.profiler
api/python/mindarmour/mindarmour api/python/mindarmour/mindarmour
api/python/mindarmour/mindarmour.utils api/python/mindarmour/mindarmour.utils
......
...@@ -29,12 +29,12 @@ Performance data like operators' execution time is recorded in files and can be ...@@ -29,12 +29,12 @@ Performance data like operators' execution time is recorded in files and can be
## Preparing the Training Script ## Preparing the Training Script
To enable the performance profiling of neural networks, MindInsight Profiler APIs should be added into the script. At first, the MindInsight `Profiler` object need to be set after set context and before the network initialization. Then, at the end of the training, `Profiler.analyse()` should be called to finish profiling and generate the perforamnce analyse results. To enable the performance profiling of neural networks, MindSpore Profiler APIs should be added into the script. At first, the MindSpore `Profiler` object need to be set after set context and before the network initialization. Then, at the end of the training, `Profiler.analyse()` should be called to finish profiling and generate the perforamnce analyse results.
The sample code is as follows: The sample code is as follows:
```python ```python
from mindinsight.profiler import Profiler from mindspore.profiler import Profiler
from mindspore import Model, nn, context from mindspore import Model, nn, context
......
...@@ -30,14 +30,14 @@ ...@@ -30,14 +30,14 @@
## 准备训练脚本 ## 准备训练脚本
为了收集神经网络的性能数据,需要在训练脚本中添加MindInsight Profiler相关接口。 为了收集神经网络的性能数据,需要在训练脚本中添加MindSpore Profiler相关接口。
-`set_context`之后和初始化网络之前,需要初始化MindInsight `Profiler`对象。 -`set_context`之后和初始化网络之前,需要初始化MindSpore `Profiler`对象。
- 在训练结束后,调用`Profiler.analyse()`停止性能数据收集并生成性能分析结果。 - 在训练结束后,调用`Profiler.analyse()`停止性能数据收集并生成性能分析结果。
样例代码如下: 样例代码如下:
```python ```python
from mindinsight.profiler import Profiler from mindspore.profiler import Profiler
from mindspore import Model, nn, context from mindspore import Model, nn, context
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册