diff --git a/model_zoo/official/cv/tinydarknet/README.md b/model_zoo/official/cv/tinydarknet/README.md index fbac7f4354..d3153fe2a9 100644 --- a/model_zoo/official/cv/tinydarknet/README.md +++ b/model_zoo/official/cv/tinydarknet/README.md @@ -71,7 +71,7 @@ After installing MindSpore via the official website, you can start training and ```python # run training example - bash ./scripts/run_standalone_train.sh + bash ./scripts/run_standalone_train.sh 0 # run distributed training example bash ./scripts/run_distribute_train.sh rank_table.json @@ -164,7 +164,7 @@ For more configuration details, please refer the script config.py. - running on Ascend: ```python - bash scripts/run_standalone_train.sh + bash scripts/run_standalone_train.sh 0 ``` The command above will run in the background, you can view the results through the file train.log. diff --git a/model_zoo/official/cv/tinydarknet/README_CN.md b/model_zoo/official/cv/tinydarknet/README_CN.md index 890b9b4b87..5309f323f7 100644 --- a/model_zoo/official/cv/tinydarknet/README_CN.md +++ b/model_zoo/official/cv/tinydarknet/README_CN.md @@ -79,7 +79,7 @@ Tiny-DarkNet是Joseph Chet Redmon等人提出的一个16层的针对于经典的 ```python # 单卡训练 - bash ./scripts/run_standalone_train.sh + bash ./scripts/run_standalone_train.sh 0 # 分布式训练 bash ./scripts/run_distribute_train.sh rank_table.json @@ -172,7 +172,7 @@ Tiny-DarkNet是Joseph Chet Redmon等人提出的一个16层的针对于经典的 - 在Ascend资源上运行: ```python - bash ./scripts/run_standalone_train.sh + bash ./scripts/run_standalone_train.sh 0 ``` 上述的命令将运行在后台中,可以通过 `train.log` 文件查看运行结果. diff --git a/model_zoo/official/cv/tinydarknet/scripts/run_standalone_train.sh b/model_zoo/official/cv/tinydarknet/scripts/run_standalone_train.sh index a72be567fb..d91521ce48 100644 --- a/model_zoo/official/cv/tinydarknet/scripts/run_standalone_train.sh +++ b/model_zoo/official/cv/tinydarknet/scripts/run_standalone_train.sh @@ -14,9 +14,10 @@ # limitations under the License. # ============================================================================ +export DEVICE_ID=$1 rm -rf ./train_single mkdir ./train_single cp -r ./src ./train_single cp ./train.py ./train_single cd ./train_single -python ./train.py > ./train.log 2>&1 & +python ./train.py --device_id=$DEVICE_ID > ./train.log 2>&1 &