Skip to content

Commit

Permalink
use inbench
Browse files Browse the repository at this point in the history
Signed-off-by: zehao-intel <zehao.huang@intel.com>
  • Loading branch information
zehao-intel committed Jul 15, 2024
1 parent 177ee53 commit 38fdcff
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions examples/3.x_api/pytorch/cv/mixed_precision/run_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,26 @@ function run_benchmark {
else
extra_cmd="${dataset_location}"
fi

python main.py \
--pretrained \
--tuned_checkpoint ${tuned_checkpoint} \
-b ${batch_size} \
-a ${input_model} \
${mode_cmd} \
${extra_cmd}
if [[ ${mode} == "accuracy" ]]; then
python main.py \
--pretrained \
--tuned_checkpoint ${tuned_checkpoint} \
-b ${batch_size} \
-a ${input_model} \
${mode_cmd} \
${extra_cmd}
elif [[ ${mode} == "performance" ]]; then
incbench --num_c 4 --num_i 7 python main.py \
--pretrained \
--tuned_checkpoint ${tuned_checkpoint} \
-b ${batch_size} \
-a ${input_model} \
${mode_cmd} \
${extra_cmd}
else
echo "Error: No such mode: ${mode}"
exit 1
fi
}

main "$@"

0 comments on commit 38fdcff

Please sign in to comment.