Skip to content
Snippets Groups Projects
Commit 33531dc2 authored by wangzeyangyi's avatar wangzeyangyi
Browse files

script fix

fix
parent 272db35c
No related branches found
No related tags found
No related merge requests found
......@@ -96,10 +96,9 @@ The entire code structure is as following:
└─download_Pix2Pix_dataset.sh # download dataset
├── scripts
└─run_infer_310.sh # launch ascend 310 inference
└─run_train_ascend.sh # launch ascend training(1 pcs)
└─run_distribute_train_ascend.sh # launch ascend training(8 pcs)
└─run_eval_ascend.sh # launch ascend eval
└─run_train_gpu.sh # launch gpu training(1 pcs)
└─run_train.sh # launch gpu/ascend training(1 pcs)
└─run_distribute_train_gpu.sh # launch gpu training(8 pcs)
└─run_eval_gpu.sh # launch gpu eval
├─ imgs
......@@ -180,7 +179,7 @@ bash run_distribute_train_ascend.sh [DEVICE_NUM] [DISTRIBUTE] [RANK_TABLE_FILE]
```python
python train.py --device_target [GPU] --device_id [0]
OR
bash scripts/run_train_gpu.sh [DEVICE_TARGET] [DEVICE_ID]
bash scripts/run_train.sh [DEVICE_TARGET] [DEVICE_ID]
```
- running distributed trainning on GPU with fixed parameters
......
......@@ -46,6 +46,7 @@ do
mkdir ./train_parallel$i/results/loss_show
cp -r ../src ./train_parallel$i
cp -r ../*.py ./train_parallel$i
cp -r ../*.yaml ./train_parallel$i
cd ./train_parallel$i || exit
export RANK_ID=$i
echo "start training for rank $i, device $DEVICE_ID"
......
#!/bin/bash
# Copyright 2020-2021 Huawei Technologies Co., Ltd
# Copyright 2020-2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -43,6 +43,7 @@ export RANK_SIZE=$3
rm -rf ./train_parallel
mkdir ./train_parallel
cp ../*.py ./train_parallel
cp -r ../*.yaml ./train_parallel
cp *.sh ./train_parallel
cp -r ../src ./train_parallel
mkdir ./train_parallel/results
......
......@@ -21,7 +21,7 @@ echo "==========================================================================
if [ $# != 2 ]
then
echo "Usage: bash run_train_gpu.sh [DEVICE_TARGET] [DEVICE_ID]"
echo "Usage: bash run_train.sh [DEVICE_TARGET] [DEVICE_ID]"
exit 1
fi
......@@ -35,6 +35,7 @@ mkdir ./train/results/predict
cp ./*.py ./train
cp ./scripts/*.sh ./train
cp -r ./src ./train
cp -r ./*.yaml ./train
cd ./train || exit
python train.py --device_target GPU --device_id 0 &> log &
python train.py --device_target $1 --device_id $2 &> log &
#!/bin/bash
# Copyright 2021-2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
echo "====================================================================================================================="
echo "Please run the train as: "
echo "python train.py device_target device_id"
echo "for example: python train.py --device_target Ascend --device_id 0"
echo "====================================================================================================================="
if [ $# != 2 ]
then
echo "Usage: bash run_train_ascend.sh [DEVICE_TARGET] [DEVICE_ID]"
exit 1
fi
python train.py --device_target Ascend --device_id 0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment