Browse Source

fix mobilenetv2_quant gpu bug

tags/v1.1.0
xiaoyisd 5 years ago
parent
commit
35b7dd4651
2 changed files with 3 additions and 4 deletions
  1. +2
    -2
      model_zoo/official/cv/mobilenetv2_quant/scripts/run_train.sh
  2. +1
    -2
      model_zoo/official/cv/mobilenetv2_quant/train.py

+ 2
- 2
model_zoo/official/cv/mobilenetv2_quant/scripts/run_train.sh View File

@@ -133,7 +133,7 @@ run_ascend(){
} }


run_gpu(){ run_gpu(){
if [ $# -gt 3 ] || [ $# -lt 2 ]
if [ $# -gt 4 ] || [ $# -lt 3 ]
then then
echo "Usage: bash run_train.sh [GPU] [DEVICE_ID_LIST] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)\n " echo "Usage: bash run_train.sh [GPU] [DEVICE_ID_LIST] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)\n "
exit 1 exit 1
@@ -182,7 +182,7 @@ run_gpu(){
if [ $# == 4 ] if [ $# == 4 ]
then then
mpirun --allow-run-as-root -n ${RANK_SIZE} --output-filename log_output --merge-stderr-to-stdout \ mpirun --allow-run-as-root -n ${RANK_SIZE} --output-filename log_output --merge-stderr-to-stdout \
python train.py --device_traget=$1 --dataset_path=$PATH1 --pre_trained=$PATH2 &> train.log &
python train.py --device_target=$1 --dataset_path=$PATH1 --pre_trained=$PATH2 &> train.log &
fi fi


cd .. cd ..


+ 1
- 2
model_zoo/official/cv/mobilenetv2_quant/train.py View File

@@ -166,8 +166,7 @@ def train_on_gpu():
per_channel=[True, False], per_channel=[True, False],
symmetric=[True, False], symmetric=[True, False],
freeze_bn=1000000, freeze_bn=1000000,
quant_delay=step_size * 2,
use_oneconv_fold=True)
quant_delay=step_size * 2)
network = quantizer.quantize(network) network = quantizer.quantize(network)


# get learning rate # get learning rate


Loading…
Cancel
Save