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

!794 Update SummaryStep to SummaryCollector, and add CPU support

Merge pull request !794 from ougongchang/fix_summarystep_r0.7
# Computational Graph Visualization Design
`Ascend` `GPU` `Model Development` `Model Optimization` `Framework Development` `Intermediate` `Expert` `Contributor`
`Ascend` `GPU` `CPU` `Model Development` `Model Optimization` `Framework Development` `Intermediate` `Expert` `Contributor`
<!-- TOC -->
......
# Tensor Visualization Design
`Ascend` `GPU` `Model Development` `Model Optimization` `Framework Development` `Intermediate` `Expert` `Contributor`
`Ascend` `GPU` `CPU` `Model Development` `Model Optimization` `Framework Development` `Intermediate` `Expert` `Contributor`
<!-- TOC -->
......
# Overall Design of Training Visualization
`Ascend` `GPU` `CPU` `Model Development` `Model Optimization` `Framework Development` `Intermediate` `Expert` `Contributor`
<!-- TOC -->
- [Overall Design of Training Visualization](#overall-design-of-training-visualization)
......
# 计算图可视设计
`Ascend` `GPU` `模型开发` `模型调优` `框架开发` `中级` `高级` `贡献者`
`Ascend` `GPU` `CPU` `模型开发` `模型调优` `框架开发` `中级` `高级` `贡献者`
<!-- TOC -->
......
# Profiler设计文档
`Ascend` `GPU` `模型开发` `模型调优` `框架开发` `中级` `高级` `贡献者`
<!-- TOC -->
- [Profiler设计文档](#profiler设计文档)
......
# 张量可视设计
`Ascend` `GPU` `模型开发` `模型调优` `框架开发` `中级` `高级` `贡献者`
`Ascend` `GPU` `CPU` `模型开发` `模型调优` `框架开发` `中级` `高级` `贡献者`
<!-- TOC -->
......
# 训练可视总体设计
`Ascend` `GPU` `模型开发` `模型调优` `框架开发` `中级` `高级` `贡献者`
`Ascend` `GPU` `CPU` `模型开发` `模型调优` `框架开发` `中级` `高级` `贡献者`
<!-- TOC -->
......
......@@ -31,7 +31,7 @@ For example, you can monitor the loss, save model parameters, dynamically adjust
MindSpore provides the callback capabilities to allow users to insert customized operations in a specific phase of training or inference, including:
- Callback functions such as `ModelCheckpoint`, `LossMonitor`, and `SummaryStep` provided by the MindSpore framework
- Callback functions such as `ModelCheckpoint`, `LossMonitor`, and `SummaryCollector` provided by the MindSpore framework
- Custom callback functions
Usage: Transfer the callback object in the `model.train` method. The callback object can be a list, for example:
......@@ -39,13 +39,13 @@ Usage: Transfer the callback object in the `model.train` method. The callback ob
```python
ckpt_cb = ModelCheckpoint()
loss_cb = LossMonitor()
summary_cb = SummaryStep()
summary_cb = SummaryCollector(summary_dir='./summary_dir')
model.train(epoch, dataset, callbacks=[ckpt_cb, loss_cb, summary_cb])
```
`ModelCheckpoint` can save model parameters for retraining or inference.
`LossMonitor` can output loss information in logs for users to view. In addition, `LossMonitor` monitors the loss value change during training. When the loss value is `Nan` or `Inf`, the training terminates.
SummaryStep can save the training information to a file for later use.
`SummaryCollector` can save the training information to files for later use.
During the training process, the callback list will execute the callback function in the defined order. Therefore, in the definition process, the dependency between callbacks needs to be considered.
### Custom Callback
......
# Dashboard
`Ascend` `GPU` `Model Optimization` `Intermediate` `Expert`
`Ascend` `GPU` `CPU` `Model Optimization` `Intermediate` `Expert`
<!-- TOC -->
......
# Lineage and Scalars Comparision
`Ascend` `GPU` `Model Optimization` `Intermediate` `Expert`
`Ascend` `GPU` `CPU` `Model Optimization` `Intermediate` `Expert`
<!-- TOC -->
......
# MindInsight Commands
`Ascend` `GPU` `Model Optimization` `Intermediate` `Expert`
`Ascend` `GPU` `CPU` `Model Optimization` `Intermediate` `Expert`
<!-- TOC -->
......
# Summary Record
`Ascend` `GPU` `Model Optimization` `Intermediate` `Expert`
`Ascend` `GPU` `CPU` `Model Optimization` `Intermediate` `Expert`
<!-- TOC -->
......
......@@ -33,7 +33,7 @@ Callback是回调函数的意思,但它其实不是一个函数而是一个类
MindSpore提供Callback能力,支持用户在训练/推理的特定阶段,插入自定义的操作。包括:
- MindSpore框架提供的`ModelCheckpoint``LossMonitor``SummaryStep`等Callback函数。
- MindSpore框架提供的`ModelCheckpoint``LossMonitor``SummaryCollector`等Callback函数。
- MindSpore支持用户自定义Callback。
使用方法:在`model.train`方法中传入Callback对象,它可以是一个Callback列表,例:
......@@ -41,13 +41,13 @@ MindSpore提供Callback能力,支持用户在训练/推理的特定阶段,
```python
ckpt_cb = ModelCheckpoint()
loss_cb = LossMonitor()
summary_cb = SummaryStep()
summary_cb = SummaryCollector(summary_dir='./summary_dir')
model.train(epoch, dataset, callbacks=[ckpt_cb, loss_cb, summary_cb])
```
`ModelCheckpoint`可以保存模型参数,以便进行再训练或推理。
`LossMonitor`可以在日志中输出loss,方便用户查看,同时它还会监控训练过程中的loss值变化情况,当loss值为`Nan``Inf`时终止训练。
SummaryStep可以把训练过程中的信息存储到文件中,以便后续进行查看或可视化展示。
`SummaryCollector` 可以把训练过程中的信息存储到文件中,以便后续进行查看或可视化展示。
在训练过程中,Callback列表会按照定义的顺序执行Callback函数。因此在定义过程中,需考虑Callback之间的依赖关系。
### 自定义Callback
......
# 训练看板
`Ascend` `GPU` `模型调优` `中级` `高级`
`Ascend` `GPU` `CPU` `模型调优` `中级` `高级`
<!-- TOC -->
......
# 溯源和对比看板
`Ascend` `GPU` `模型调优` `中级` `高级`
`Ascend` `GPU` `CPU` `模型调优` `中级` `高级`
<!-- TOC -->
......
# MindInsight相关命令
`Ascend` `GPU` `模型调优` `中级` `高级`
`Ascend` `GPU` `CPU` `模型调优` `中级` `高级`
<!-- TOC -->
......
# Summary数据收集
`Ascend` `GPU` `模型调优` `中级` `高级`
`Ascend` `GPU` `CPU` `模型调优` `中级` `高级`
<!-- TOC -->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册