add visualdl doc
parent
f3b2e8aa32
commit
dcd0acba5e
|
@ -41,7 +41,8 @@ python -m paddle.distributed.launch \
|
|||
--selected_gpus="0,1,2,3" \
|
||||
tools/train.py \
|
||||
-c ./configs/ResNet/ResNet50_vd.yaml \
|
||||
-o use_mix=1
|
||||
-o use_mix=1 \
|
||||
--vdl_dir=./scalar/
|
||||
|
||||
```
|
||||
|
||||
|
@ -53,6 +54,13 @@ epoch:0 train step:522 loss:1.6330 lr:0.100000 elapse:0.210
|
|||
|
||||
也可以直接修改模型对应的配置文件更新配置。具体配置参数参考[配置文档](config.md)。
|
||||
|
||||
训练期间可以通过VisualDL实时观察loss变化,启动命令如下:
|
||||
|
||||
```bash
|
||||
visualdl --logdir ./scalar --host <host_IP> --port <port_num>
|
||||
|
||||
```
|
||||
|
||||
|
||||
### 2.2 模型微调
|
||||
|
||||
|
|
|
@ -82,6 +82,13 @@ def error(fmt, *args):
|
|||
|
||||
|
||||
def scaler(name, value, step, writer):
|
||||
"""
|
||||
This function will draw a scalar curve generated by the visualdl.
|
||||
Usage: Install visualdl: pip3 install visualdl==2.0.0b4
|
||||
and then:
|
||||
visualdl --logdir ./scalar --host 0.0.0.0 --port 8830
|
||||
to preview loss corve in real time.
|
||||
"""
|
||||
writer.add_scalar(name, value, step)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue