-
Notifications
You must be signed in to change notification settings - Fork 0
/
analyze_collision.retrain.sh
executable file
·58 lines (45 loc) · 1.19 KB
/
analyze_collision.retrain.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# check the dataset name
if [ "$1" == "" ]; then
echo "Error: specify the dataset, abort."
exit 1
fi
# check the GPU has pinned
if [ "$2" == "" ]; then
echo "Error: specify the interpolation mode (one/multi), abort."
exit 1
fi
# common configurations
DATASET=$1
INTMODE=$2
# FashionMNIST
if [ "$DATASET" == "fashion_mnist" ]; then
DATAPTH=""
IPRATIO=(0.1 0.2 0.4 0.6 0.8 1.0) # no meaning on 0.0 (it's clean...)
NETWORK="shallow-mlp"
NETBASE="models/fashion_mnist/vanilla_shallow-mlp_100_100_0.04/best"
# unknown case
else
echo "Error: unknown dataset - $1"
exit 1
fi
# ----------------------------------------------------------------
# Run for each model location
# ----------------------------------------------------------------
for each_alpha in ${IPRATIO[@]}; do
# : run
echo "python3 analyze_collision.retrain.py \
--dataset=$DATASET \
--datapth=$DATAPTH \
--network=$NETWORK \
--netbase=$NETBASE \
--imode=$INTMODE \
--alpha=$each_alpha"
python3 analyze_collision.retrain.py \
--dataset=$DATASET \
--datapth=$DATAPTH \
--network=$NETWORK \
--netbase=$NETBASE \
--imode=$INTMODE \
--alpha=$each_alpha
done