Browse Source

!5334 update the FP16 model copy rules for CI

Merge pull request !5334 from mengchunyang/mm
tags/v1.0.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
a48bbf49d6
2 changed files with 13 additions and 14 deletions
  1. +3
    -3
      mindspore/lite/test/models_fp16.cfg
  2. +10
    -11
      mindspore/lite/test/run_benchmark_nets.sh

+ 3
- 3
mindspore/lite/test/models_fp16.cfg View File

@@ -1,7 +1,7 @@
detect-deeper-halfdeeper-mbv1-shortcut-400-400_nopostprocess_simplified.fp16 detect-deeper-halfdeeper-mbv1-shortcut-400-400_nopostprocess_simplified.fp16
model_emotions_0727_nosoftmax.fp16
model_emotions_0727_nosoftmax.tflite.fp16
mtk_isface.fp16 mtk_isface.fp16
mtk_landmark.fp16 mtk_landmark.fp16
mtk_pose_tuku.fp16 mtk_pose_tuku.fp16
mtk_age_gender.fp16
mtk_model_face_dress.fp16
mtk_age_gender.tflite.fp16
mtk_model_face_dress.tflite.fp16

+ 10
- 11
mindspore/lite/test/run_benchmark_nets.sh View File

@@ -403,17 +403,6 @@ rm -rf ${basepath}/ms_models
mkdir -p ${basepath}/ms_models mkdir -p ${basepath}/ms_models
ms_models_path=${basepath}/ms_models ms_models_path=${basepath}/ms_models


echo "start convert models ... :"
# Copy fp16 ms models:
while read line; do
model_name=${line}
if [[ $model_name == \#* ]]; then
continue
fi
echo "cp '${models_path}'/'${model_name}'.ms' ${ms_models_path}'/'${model_name}'.ms" >> "${run_benchmark_log_file}"
cp $models_path/${model_name}.ms ${ms_models_path}/${model_name}.ms
done < ${models_fp16_config}

# Convert tflite models: # Convert tflite models:
while read line; do while read line; do
model_name=${line} model_name=${line}
@@ -483,6 +472,16 @@ while read line; do
./converter_lite --fmk=TFLITE --modelFile=${models_path}/${model_name} --outputFile=${ms_models_path}/${model_name} --quantType=AwareTraining || Convert_status=$? ./converter_lite --fmk=TFLITE --modelFile=${models_path}/${model_name} --outputFile=${ms_models_path}/${model_name} --quantType=AwareTraining || Convert_status=$?
done < ${models_tflite_awaretraining_config} done < ${models_tflite_awaretraining_config}


# Copy fp16 ms models:
while read line; do
model_name=${line%.*}
if [[ $model_name == \#* ]]; then
continue
fi
echo 'cp '${ms_models_path}'/'${model_name}'.ms' ${ms_models_path}'/'${model_name}'.fp16.ms'
cp ${ms_models_path}/${model_name}.ms ${ms_models_path}/${model_name}.fp16.ms
done < ${models_fp16_config}

# Check all result and return value # Check all result and return value
if [[ ${Convert_status} = 0 ]];then if [[ ${Convert_status} = 0 ]];then
echo "convert is ended" echo "convert is ended"


Loading…
Cancel
Save