-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest_lenet5_ulq.sh
37 lines (35 loc) · 1.2 KB
/
test_lenet5_ulq.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
30
31
32
33
34
35
36
37
#!/usr/bin/env sh
set -e
TOOLS=./build/tools
MODEL=./examples/mnist/ULQ
# 1bit
$TOOLS/caffe test \
--model=$MODEL/lenet_bn_ulq1.prototxt \
--weights=$MODEL/model/lenet_bn_ulq1_iter_30000.caffemodel -gpu 0 \
2>&1>&$MODEL/log/log_lenet_bn_ulq1_test.log& $@
# 2bit
$TOOLS/caffe test \
--model=$MODEL/lenet_bn_ulq2.prototxt \
--weights=$MODEL/model/lenet_bn_ulq2_iter_30000.caffemodel -gpu 1 \
2>&1>&$MODEL/log/log_lenet_bn_ulq2_test.log& $@
# 4bit
$TOOLS/caffe test \
--model=$MODEL/lenet_bn_ulq4.prototxt \
--weights=$MODEL/model/lenet_bn_ulq4_iter_30000.caffemodel -gpu 2 \
2>&1>&$MODEL/log/log_lenet_bn_ulq4_test.log& $@
# 8bit
$TOOLS/caffe test \
--model=$MODEL/lenet_bn_ulq8.prototxt \
--weights=$MODEL/model/lenet_bn_ulq8_iter_30000.caffemodel -gpu 3 \
2>&1>&$MODEL/log/log_lenet_bn_ulq8_test.log& $@
# 16bit
$TOOLS/caffe test \
--model=$MODEL/lenet_bn_ulq16.prototxt \
--weights=$MODEL/model/lenet_bn_ulq16_iter_30000.caffemodel -gpu 0 \
2>&1>&$MODEL/log/log_lenet_bn_ulq16_test.log& $@
#float
# 1bit
$TOOLS/caffe test \
--model=./examples/mnist/lenet_tn.prototxt \
--weights=./examples/mnist/model/lenet_tn_iter_30000.caffemodel -gpu 1 \
2>&1>&$MODEL/log/log_lenet_tn_test.log& $@