diff --git a/doc/doc_ch/detection.md b/doc/doc_ch/detection.md index a31907015de3c6a119764917893ade29a0ff5493..ec3cb2766071d4c1ff6927de3e79c3e3c0c51131 100644 --- a/doc/doc_ch/detection.md +++ b/doc/doc_ch/detection.md @@ -76,8 +76,8 @@ tar -xf ./pretrain_models/MobileNetV3_large_x0_5_pretrained.tar ./pretrain_model # 单机单卡训练 mv3_db 模型 python3 tools/train.py -c configs/det/det_mv3_db.yml \ -o Global.pretrain_weights=./pretrain_models/MobileNetV3_large_x0_5_pretrained/ -# 单机多卡训练,通过 --select_gpus 参数设置使用的GPU ID; -python3 -m paddle.distributed.launch --selected_gpus '0,1,2,3' tools/train.py -c configs/det/det_mv3_db.yml \ +# 单机多卡训练,通过 --gpus 参数设置使用的GPU ID;如果使用的paddle版本小于2.0rc1,请使用'--select_gpus'参数选择要使用的GPU +python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs/det/det_mv3_db.yml \ -o Global.pretrain_weights=./pretrain_models/MobileNetV3_large_x0_5_pretrained/ ``` diff --git a/doc/doc_en/detection_en.md b/doc/doc_en/detection_en.md index 83e949344f1821aae2dcb57911aff7173246076f..5797126b0c322eb3996870e83c63ce28426a7c13 100644 --- a/doc/doc_en/detection_en.md +++ b/doc/doc_en/detection_en.md @@ -76,8 +76,10 @@ You can also use `-o` to change the training parameters without modifying the ym python3 tools/train.py -c configs/det/det_mv3_db.yml -o Optimizer.base_lr=0.0001 # multi-GPU training -# Set the GPU ID used by the '--select_gpus' parameter; -python3 -m paddle.distributed.launch --selected_gpus '0,1,2,3' tools/train.py -c configs/det/det_mv3_db.yml -o Optimizer.base_lr=0.0001 +# Set the GPU ID used by the '--gpus' parameter; If your paddle version less than 2.0rc1, please use '--selected_gpus' +python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs/det/det_mv3_db.yml -o Optimizer.base_lr=0.0001 + + ``` #### load trained model and continue training diff --git a/train.sh b/train.sh index a0483e4dc81a4530822850f5a0a20ec9b4c94764..c511c51600cc2d939f0bc8c7f52a3f3c6ce52d58 100644 --- a/train.sh +++ b/train.sh @@ -1 +1,5 @@ - python3 -m paddle.distributed.launch --selected_gpus '0,1,2,3,4,5,6,7' tools/train.py -c configs/rec/rec_mv3_none_bilstm_ctc.yml \ No newline at end of file +# for paddle.__version__ >= 2.0rc1 +python3 -m paddle.distributed.launch --gpus '0,1,2,3,4,5,6,7' tools/train.py -c configs/rec/rec_mv3_none_bilstm_ctc.yml + +# for paddle.__version__ < 2.0rc1 +# python3 -m paddle.distributed.launch --selected_gpus '0,1,2,3,4,5,6,7' tools/train.py -c configs/rec/rec_mv3_none_bilstm_ctc.yml