未验证 提交 dae5ecf2 编写于 作者: C cuicheng01 提交者: GitHub

Merge branch 'PaddlePaddle:develop' into develop

...@@ -7,29 +7,30 @@ VisualDL, a visualization analysis tool of PaddlePaddle, provides a variety of c ...@@ -7,29 +7,30 @@ VisualDL, a visualization analysis tool of PaddlePaddle, provides a variety of c
Now PaddleClas support use VisualDL to visualize the changes of learning rate, loss, accuracy in training. Now PaddleClas support use VisualDL to visualize the changes of learning rate, loss, accuracy in training.
### Set config and start training ### Set config and start training
You only need to set the `vdl_dir` field in train config: You only need to set the field `Global.use_visualdl` to `True` in train config:
```yaml ```yaml
# config.yaml # config.yaml
vdl_dir: "./vdl.log" Global:
...
use_visualdl: True
...
``` ```
`vdl_dir`: Specify the directory where VisualDL stores logs. PaddleClas will save the VisualDL logs to subdirectory `vdl/` under the output directory specified by `Global.output_dir`. And then you just need to start training normally:
Then normal start training:
```shell ```shell
python3 tools/train.py -c config.yaml python3 tools/train.py -c config.yaml
``` ```
### Start VisualDL ### Start VisualDL
After starting the training program, you can start the VisualDL service in the new terminal session: After starting the training program, you can start the VisualDL service in a new terminal session:
```shell ```shell
visualdl --logdir ./vdl.log visualdl --logdir ./output/vdl/
``` ```
In the above command, `--logdir` specify the logs directory. VisualDL will traverse and iterate to find the subdirectories of the specified directory to visualize all the experimental results. You can also use the following parameters to set the IP and port number of the VisualDL service: In the above command, `--logdir` specify the directory of the VisualDL logs produced in training. VisualDL will traverse and iterate to find the subdirectories of the specified directory to visualize all the experimental results. You can also use the following parameters to set the IP and port number of the VisualDL service:
* `--host`:ip, default is 127.0.0.1 * `--host`:ip, default is 127.0.0.1
* `--port`:port, default is 8040 * `--port`:port, default is 8040
......
...@@ -7,15 +7,17 @@ VisualDL是飞桨可视化分析工具,以丰富的图表呈现训练参数变 ...@@ -7,15 +7,17 @@ VisualDL是飞桨可视化分析工具,以丰富的图表呈现训练参数变
现在PaddleClas支持在训练阶段使用VisualDL查看训练过程中学习率(learning rate)、损失值(loss)以及准确率(accuracy)的变化情况。 现在PaddleClas支持在训练阶段使用VisualDL查看训练过程中学习率(learning rate)、损失值(loss)以及准确率(accuracy)的变化情况。
### 设置config文件并启动训练 ### 设置config文件并启动训练
在PaddleClas中使用VisualDL,只需在训练配置文件(config文件)添加如下字段 在PaddleClas中使用VisualDL,只需在训练配置文件(config文件)中设置字段 `Global.use_visualdl``True`
```yaml ```yaml
# config.yaml # config.yaml
vdl_dir: "./vdl.log" Global:
...
use_visualdl: True
...
``` ```
`vdl_dir` 用于指定VisualDL用于保存log信息的目录。
然后正常启动训练即可: PaddleClas 会将 VisualDL 的日志保存在 `Global.output_dir` 字段指定目录下的 `vdl/` 子目录下,然后正常启动训练即可:
```shell ```shell
python3 tools/train.py -c config.yaml python3 tools/train.py -c config.yaml
...@@ -25,10 +27,10 @@ python3 tools/train.py -c config.yaml ...@@ -25,10 +27,10 @@ python3 tools/train.py -c config.yaml
在启动训练程序后,可以在新的终端session中启动VisualDL服务: 在启动训练程序后,可以在新的终端session中启动VisualDL服务:
```shell ```shell
visualdl --logdir ./vdl.log visualdl --logdir ./output/vdl/
``` ```
上述命令中,参数`--logdir`用于指定日志目录,VisualDL将遍历并且迭代寻找指定目录的子目录,将所有实验结果进行可视化。也同样可以使用下述参数设定VisualDL服务的ip及端口号: 上述命令中,参数`--logdir`用于指定保存 VisualDL 日志的目录,VisualDL将遍历并且迭代寻找指定目录的子目录,将所有实验结果进行可视化。也同样可以使用下述参数设定VisualDL服务的ip及端口号:
* `--host`:设定IP,默认为127.0.0.1 * `--host`:设定IP,默认为127.0.0.1
* `--port`:设定端口,默认为8040 * `--port`:设定端口,默认为8040
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册