| @@ -71,7 +71,7 @@ After installing MindSpore via the official website, you can start training and | |||||
| ```python | ```python | ||||
| # run training example | # run training example | ||||
| bash ./scripts/run_standalone_train.sh | |||||
| bash ./scripts/run_standalone_train.sh 0 | |||||
| # run distributed training example | # run distributed training example | ||||
| bash ./scripts/run_distribute_train.sh rank_table.json | 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: | - running on Ascend: | ||||
| ```python | ```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. | The command above will run in the background, you can view the results through the file train.log. | ||||
| @@ -79,7 +79,7 @@ Tiny-DarkNet是Joseph Chet Redmon等人提出的一个16层的针对于经典的 | |||||
| ```python | ```python | ||||
| # 单卡训练 | # 单卡训练 | ||||
| bash ./scripts/run_standalone_train.sh | |||||
| bash ./scripts/run_standalone_train.sh 0 | |||||
| # 分布式训练 | # 分布式训练 | ||||
| bash ./scripts/run_distribute_train.sh rank_table.json | bash ./scripts/run_distribute_train.sh rank_table.json | ||||
| @@ -172,7 +172,7 @@ Tiny-DarkNet是Joseph Chet Redmon等人提出的一个16层的针对于经典的 | |||||
| - 在Ascend资源上运行: | - 在Ascend资源上运行: | ||||
| ```python | ```python | ||||
| bash ./scripts/run_standalone_train.sh | |||||
| bash ./scripts/run_standalone_train.sh 0 | |||||
| ``` | ``` | ||||
| 上述的命令将运行在后台中,可以通过 `train.log` 文件查看运行结果. | 上述的命令将运行在后台中,可以通过 `train.log` 文件查看运行结果. | ||||
| @@ -14,9 +14,10 @@ | |||||
| # limitations under the License. | # limitations under the License. | ||||
| # ============================================================================ | # ============================================================================ | ||||
| export DEVICE_ID=$1 | |||||
| rm -rf ./train_single | rm -rf ./train_single | ||||
| mkdir ./train_single | mkdir ./train_single | ||||
| cp -r ./src ./train_single | cp -r ./src ./train_single | ||||
| cp ./train.py ./train_single | cp ./train.py ./train_single | ||||
| cd ./train_single | cd ./train_single | ||||
| python ./train.py > ./train.log 2>&1 & | |||||
| python ./train.py --device_id=$DEVICE_ID > ./train.log 2>&1 & | |||||