add ptq infer
parent
d2ffc5e408
commit
6adee2720f
|
@ -0,0 +1,54 @@
|
|||
===========================train_params===========================
|
||||
model_name:GeneralRecognitionV2_PPLCNetV2_base
|
||||
python:python3.7
|
||||
gpu_list:0
|
||||
-o Global.device:gpu
|
||||
-o Global.auto_cast:null
|
||||
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=100
|
||||
-o Global.output_dir:./output/
|
||||
-o DataLoader.Train.sampler.batch_size:8
|
||||
-o Global.pretrained_model:null
|
||||
train_model_name:latest
|
||||
train_infer_img_dir:./dataset/ILSVRC2012/val
|
||||
null:null
|
||||
##
|
||||
trainer:pact_train
|
||||
norm_train:null
|
||||
pact_train:tools/train.py -c ppcls/configs/GeneralRecognitionV2/GeneralRecognitionV2_PPLCNetV2_base.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
null:null
|
||||
null:null
|
||||
##
|
||||
===========================eval_params===========================
|
||||
eval:tools/eval.py -c ppcls/configs/GeneralRecognitionV2/GeneralRecognitionV2_PPLCNetV2_base.yaml
|
||||
null:null
|
||||
##
|
||||
===========================infer_params==========================
|
||||
-o Global.save_inference_dir:./inference
|
||||
-o Global.pretrained_model:
|
||||
norm_export:null
|
||||
quant_export:tools/export_model.py -c ppcls/configs/GeneralRecognitionV2/GeneralRecognitionV2_PPLCNetV2_base.yaml
|
||||
fpgm_export:null
|
||||
distill_export:null
|
||||
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/GeneralRecognitionV2/GeneralRecognitionV2_PPLCNetV2_base.yaml -o Global.save_inference_dir=./general_PPLCNetV2_base_pretrained_v1.0_infer
|
||||
export2:null
|
||||
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/models/inference/PP-ShiTuV2/general_PPLCNetV2_base_pretrained_v1.0_infer.tar
|
||||
infer_model:./general_PPLCNetV2_base_pretrained_v1.0_infer
|
||||
infer_export:True
|
||||
infer_quant:Fasle
|
||||
inference:python/predict_rec.py -c configs/inference_rec.yaml
|
||||
-o Global.use_gpu:True|False
|
||||
-o Global.enable_mkldnn:False
|
||||
-o Global.cpu_num_threads:1
|
||||
-o Global.batch_size:1
|
||||
-o Global.use_tensorrt:False
|
||||
-o Global.use_fp16:False
|
||||
-o Global.rec_inference_model_dir:../inference
|
||||
-o Global.infer_imgs:../dataset/Aliproduct/demo_test/
|
||||
-o Global.save_log_path:null
|
||||
-o Global.benchmark:False
|
||||
null:null
|
||||
null:null
|
||||
===========================infer_benchmark_params==========================
|
||||
random_infer_input:[{float32,[3,224,224]}]
|
|
@ -245,12 +245,12 @@ elif [[ ${MODE} = "whole_infer" ]]; then
|
|||
cd ../../
|
||||
fi
|
||||
# download inference or pretrained model
|
||||
eval "wget -nc $model_url_value"
|
||||
eval "wget -nc ${model_url_value}"
|
||||
if [[ ${model_url_value} =~ ".tar" ]]; then
|
||||
tar_name=$(func_get_url_file_name "${model_url_value}")
|
||||
echo $tar_name
|
||||
echo ${tar_name}
|
||||
eval "tar -xf ${tar_name}"
|
||||
rm -rf {tar_name}
|
||||
tar xf ${tar_name}
|
||||
fi
|
||||
if [[ $model_name == "SwinTransformer_large_patch4_window7_224" || $model_name == "SwinTransformer_large_patch4_window12_384" ]]; then
|
||||
cmd="mv ${model_name}_22kto1k_pretrained.pdparams ${model_name}_pretrained.pdparams"
|
||||
|
|
Loading…
Reference in New Issue