train.sh 317 字节
Newer Older
K
KP 已提交
1 2 3 4 5 6 7 8 9
#!/bin/bash

ngpu=$1
cfg_path=$2

if [ ${ngpu} -gt 0 ]; then
    python3 -m paddle.distributed.launch --gpus $CUDA_VISIBLE_DEVICES ${BIN_DIR}/train.py \
    --cfg_path ${cfg_path}
else
K
KP 已提交
10
    echo "set CUDA_VISIBLE_DEVICES to enable multi-gpus trainning."
K
KP 已提交
11 12 13
    python3 ${BIN_DIR}/train.py \
    --cfg_path ${cfg_path}
fi