-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathrun_alexnet_tensorrt.sh
executable file
·29 lines (23 loc) · 1.05 KB
/
run_alexnet_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="alexnet"
docker_model_file="/models/vision/classification/$model_name"
model_file="$docker_model_file/$model_name"".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
echo "=======Testing alexnet with TensorRT======="
python3 $curr_dir/../../onnx2tensorrt.py --model $model_file \
--label-file $curr_dir/../1000_labels.txt
# 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