-
Notifications
You must be signed in to change notification settings - Fork 3
/
testbench.sh
executable file
·33 lines (28 loc) · 1.13 KB
/
testbench.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
#!/bin/bash
#Timeout in seconds
TIMEOUT=300
# make results folder and clear results
mkdir -p ./results
rm ./results/*
for net in 2 4 6
do
net_dir="VNN/mnist-net_256x${net}.nnet"
ep=0.02
printf "\n===========\nChecking network mnist-net_256x${net}.nnet with epsilon ${ep} and timeout ${TIMEOUT}\n"
for im_idx in {1..25}
do
image="VNN/mnist_images/image${im_idx}"
#use >> instead of | tee -a if you don't want the results to print on the terminal too
python3 -u peregriNN.py $net_dir $image $ep --timeout $TIMEOUT | tee -a results/result_256X${net}_${ep}.txt || { echo "Exiting script"; exit 1; }
done
done
net=2
ep=0.05
net_dir="VNN/mnist-net_256x${net}.nnet"
printf "\n===========\nChecking network mnist-net_256x${net}.nnet with epsilon ${ep} and timeout ${TIMEOUT}\n"
for im_idx in {1..25}
do
image="VNN/mnist_images/image${im_idx}"
#use >> instead of | tee -a if you don't want the results to print on the terminal too
python3 -u peregriNN.py $net_dir $image $ep --timeout $TIMEOUT | tee -a results/result_256X${net}_${ep}.txt || { echo "Exiting script"; exit 1; }
done