Skip to content

Commit 3d11f6d

Browse files
authored
add fcn doc with xpu
1 parent a7bd77e commit 3d11f6d

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

legacy/docs/train_on_xpu.md

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@
1010
* 数据准备(在legacy目录下):
1111

1212
```shell
13-
python pretrained_model/download_model.py deeplabv3p_xception65_bn_coco
13+
python dataset/download_optic.py
1414
```
1515

1616
* 预训练模型准备(在legacy目录下):
1717

1818
```shell
19-
python dataset/download_optic.py
19+
python pretrained_model/download_model.py deeplabv3p_xception65_bn_coco
2020
```
2121

22-
2322
* 执行训练(在legacy目录下):
2423

2524
```shell
@@ -30,16 +29,15 @@ python pdseg/train.py --cfg configs/deeplabv3p_xception65_optic_kunlun.yaml --us
3029
* 数据准备(在legacy目录下):
3130

3231
```shell
33-
python pretrained_model/download_model.py unet_bn_coco
32+
python dataset/download_optic.py
3433
```
3534

3635
* 预训练模型准备(在legacy目录下):
3736

3837
```shell
39-
python dataset/download_optic.py
38+
python pretrained_model/download_model.py unet_bn_coco
4039
```
4140

42-
4341
* 执行训练(在legacy目录下):
4442

4543
因为昆仑1的内存不够,在用昆仑1训练的时候,需要把./configs/unet_optic.yaml 里面的 BATCH_SIZE
@@ -54,3 +52,31 @@ export XPUSIM_DEVICE_MODEL=KUNLUN1
5452
python pdseg/train.py --use_xpu --cfg configs/unet_optic.yaml --use_mpio --log_steps 1 --do_eval
5553
```
5654

55+
### FCN
56+
* 数据准备(在legacy目录下):
57+
58+
```shell
59+
python dataset/download_optic.py
60+
```
61+
62+
* 预训练模型准备(在legacy目录下):
63+
64+
```shell
65+
python pretrained_model/download_model.py hrnet_w18_bn_cityscapes
66+
```
67+
68+
* 执行训练(在legacy目录下):
69+
70+
因为昆仑1的内存不够,在用昆仑1训练的时候,需要把./configs/fcn.yaml 里面的 BATCH_SIZE
71+
修改为 1
72+
73+
```shell
74+
# 指定xpu的卡号 (以0号卡为例)
75+
export FLAGS_selected_xpus=0
76+
# 执行xpu产品名称 这里指定昆仑1
77+
export XPUSIM_DEVICE_MODEL=KUNLUN1
78+
# 训练
79+
export PYTHONPATH=`pwd`
80+
python3 pdseg/train.py --cfg configs/fcn.yaml --use_mpio --log_steps 1 --do_eval
81+
```
82+

0 commit comments

Comments
 (0)