add single tiny device_id

This commit is contained in:
wukesong 2021-01-06 14:30:18 +08:00
parent e30734d1b8
commit 8a04069a1e
3 changed files with 6 additions and 5 deletions

View File

@ -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.

View File

@ -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` 文件查看运行结果.

View File

@ -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 &