Skip to content

Commit 58bbb06

Browse files
authored
add train unet doc
1 parent fabab52 commit 58bbb06

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

legacy/docs/train_on_xpu.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,31 @@ python dataset/download_optic.py
2626
python pdseg/train.py --cfg configs/deeplabv3p_xception65_optic_kunlun.yaml --use_mpio --use_xpu --log_steps 1 --do_eval
2727
```
2828

29+
### Unet
30+
* 数据准备(在legacy目录下):
31+
32+
```shell
33+
python pretrained_model/download_model.py unet_bn_coco
34+
```
35+
36+
* 预训练模型准备(在legacy目录下):
37+
38+
```shell
39+
python dataset/download_optic.py
40+
```
41+
42+
43+
* 执行训练(在legacy目录下):
44+
45+
因为昆仑1的内存不够,在用昆仑1训练的时候,需要把./configs/unet_optic.yaml 里面的 BATCH_SIZE
46+
修改为 1
47+
48+
```shell
49+
# 指定xpu的卡号 (以0号卡为例)
50+
export FLAGS_selected_xpus=0
51+
# 执行xpu产品名称 这里指定昆仑1
52+
export XPUSIM_DEVICE_MODEL=KUNLUN1
53+
# 训练
54+
python pdseg/train.py --use_xpu --cfg configs/unet_optic.yaml --use_mpio --log_steps 1 --do_eval
55+
```
56+

0 commit comments

Comments
 (0)