-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest_cifarnet_ulq.sh
37 lines (35 loc) · 1.38 KB
/
test_cifarnet_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/cifar10
WEIGHTS=./examples/cifar10/ULQ/model/cifar10_full_iter_70000.caffemodel.h5
# 1bit
$TOOLS/caffe test \
--model=$MODEL/ULQ/cifar10_full_train_test_ulq1.prototxt \
--weights=$MODEL/ULQ/model/cifar10_full_ulq1_iter_25000.caffemodel -gpu 0 \
2>&1>&$MODEL/ULQ/log/log_cifarnet_ulq1_test.log& $@
# 2bit
$TOOLS/caffe test \
--model=$MODEL/ULQ/cifar10_full_train_test_ulq2.prototxt \
--weights=$MODEL/ULQ/model/cifar10_full_ulq2_iter_25000.caffemodel -gpu 1 \
2>&1>&$MODEL/ULQ/log/log_cifarnet_ulq2_test.log& $@
# 4bit
$TOOLS/caffe test \
--model=$MODEL/ULQ/cifar10_full_train_test_ulq4.prototxt \
--weights=$MODEL/ULQ/model/cifar10_full_ulq4_iter_25000.caffemodel -gpu 2 \
2>&1>&$MODEL/ULQ/log/log_cifarnet_ulq4_test.log& $@
# 8bit
$TOOLS/caffe test \
--model=$MODEL/ULQ/cifar10_full_train_test_ulq8.prototxt \
--weights=$MODEL/ULQ/model/cifar10_full_ulq8_iter_25000.caffemodel -gpu 3 \
2>&1>&$MODEL/ULQ/log/log_cifarnet_ulq8_test.log& $@
# 16bit
#$TOOLS/caffe test \
# --model=$MODEL/ULQ/cifar10_full_train_test_ulq16.prototxt \
# --weights=$MODEL/ULQ/model/cifar10_full_ulq16_iter_25000.caffemodel -gpu 0 \
# 2>&1>&$MODEL/ULQ/log/log_cifarnet_ulq16_test.log& $@
# float
$TOOLS/caffe test \
--model=$MODEL/ULQ/cifar10_full_train_test.prototxt \
--weights=$WEIGHTS -gpu 1 \
2>&1>&$MODEL/ULQ/log/log_cifarnet_test.log& $@