-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_caffenet.sh
executable file
·27 lines (25 loc) · 917 Bytes
/
run_caffenet.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
#!/bin/bash
# RUN: %s %t.1
model_name="caffenet"
model_file="$MODELS_ROOT/vision/classification/$model_name/$model_name"
image_dir="$MODELS_ROOT/vision/test_images"
curr_dir=`dirname $0`
if [[ $# != 0 ]];then
export TEST_TEMP_DIR=`dirname $1`
fi
# check if GPU is enabled or not
if [[ $TEST_WITH_GPU -eq 1 ]]; then
echo "======== Testing with ODLA TensorRT ========"
python3 $curr_dir/../../invoke_halo.py --model $model_file.prototxt \
$model_file.caffemodel \
--label-file $curr_dir/../1000_labels.txt --input_h=227 --input_w=227 \
--input-shape=data:1x3x227x227 \
--image-dir $image_dir --odla tensorrt --img-preprocess=minus_128 | tee $1
# RUN: FileCheck --input-file %t.1 %s
else
echo "This tests uses ODLA TensorRT"
fi
# CHECK: dog.jpg ==> "Samoyed, Samoyede",
# CHECK-NEXT: food.jpg ==> "ice cream, icecream",
# CHECK-NEXT: plane.jpg ==> "airliner",
# CHECK-NEXT: sport.jpg ==> "ski",