benchmark_quant.sh 556 B

1234567891011121314151617181920212223
  1. # All rights `PaddleDetection` reserved
  2. #!/bin/bash
  3. model_dir=$1
  4. model_name=$2
  5. export img_dir="demo"
  6. export log_path="output_pipeline"
  7. echo "model_dir : ${model_dir}"
  8. echo "img_dir: ${img_dir}"
  9. # TODO: support batch size>1
  10. for run_mode in "trt_int8"; do
  11. echo "${model_name} ${model_dir}, run_mode: ${run_mode}"
  12. python deploy/python/infer.py \
  13. --model_dir=${model_dir} \
  14. --run_benchmark=True \
  15. --device=GPU \
  16. --run_mode=${run_mode} \
  17. --image_dir=${img_dir} 2>&1 | tee ${log_path}/${model_name}_gpu_runmode_${run_mode}_bs1_infer.log
  18. done