-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathrun_densenet_tensorrt.sh
executable file
·29 lines (25 loc) · 1.1 KB
/
run_densenet_tensorrt.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# RUN: %s
model_name="densenet"
docker_model_file="/models/vision/classification/$model_name"
model_file="$docker_model_file/$model_name""121.onnx"
image_dir="/models/vision/test_images"
curr_dir=`dirname $0`
# # Download model if it is not exist
# if [ ! -e $model_file ]; then
# $curr_dir/../get_cls_model_from_pytorch.py $model_name $model_file
# fi
# Download sample images if it is not exist
# $curr_dir/../../get_images.sh $image_dir
for i in 1 2 4 8 16 32 64
do
echo "=======Testing densenet with TensorRT======="
python3 $curr_dir/../../onnx2tensorrt.py --model $model_file --label-file $curr_dir/../1000_labels.txt --batch_size $i
done
# if [[ $TEST_WITH_GPU -eq 1 ]]; then
# echo "======== Testing with ODLA TensorRT ========"
# python3 $curr_dir/../../invoke_halo.py --model $model_file --image-dir $image_dir --odla tensorrt
# fi
# # Using HALO to compile and run inference with ODLA XNNPACK
# echo "======== Testing with ODLA DNNL ========"
# python3 $curr_dir/../../invoke_halo.py --model $model_file --label-file $curr_dir/../1000_labels.txt --image-dir $image_dir --odla dnnl