-
Notifications
You must be signed in to change notification settings - Fork 27
/
train_manipulation_batch.sh
65 lines (59 loc) · 1.75 KB
/
train_manipulation_batch.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
59
60
61
62
63
64
65
#!/usr/bin/bash
# If working on the server, load dependencies
if [ "$USER" = "pk91" ]; then
module load cudnn/10.1v7.6.5.32
source venv/bin/activate
fi
if [[ $2 =~ ^[0-9]+$ ]]
then
rep=$2
else
rep=3
fi
dir="agjmrs_no_downsampling"
nip="DNet"
cam="D90"
manip="sharpen,gaussian,jpeg,resample,awgn,median"
cmd="python3 train_manipulation.py --end $rep --patch 128 --epochs=1501 --ds none --nip $nip --cam $cam --manip $manip"
if [ "$2" = "dry" ]; then
cmd="echo $cmd"
fi
# Scope of parameters for exploration
ln="--ln 0.5 --ln 0.4 --ln 0.3 --ln 0.2 --ln 0.1 --ln 0.075 --ln 0.05 --ln 0.025 --ln 0.01 --ln 0.005 --ln 0.001"
lc="--lc 1.0 --lc 0.5 --lc 0.1 --lc 0.05 --lc 0.01 --lc 0.005 --lc 0.001"
case "$1" in
jpeg)
# Fixed JPEG Experiments
# for jpeg in 50 90 70 80 60 40 30 20 10 55 65 75 85 95 45 35 25 15; do
for jpeg in 50 90 70 80 60 55 65 75 85 95 50,95; do
$cmd --dir ./data/m/$dir/fan_only/jpeg/$jpeg --jpeg $jpeg
done
;;
jpeg+nip)
# Fixed JPEG + Trainable NIP
for jpeg in 30 40 50 60 70; do
$cmd --dir ./data/$dir/jpeg-nip+/$jpeg --jpeg $jpeg --train nip $ln
done
;;
dcn)
# Fixed DCN Experiments
for dcn in 4k 8k 16k; do
$cmd --dir ./data/raw/$dir/dcn/$dcn --dcn $dcn
done
;;
dcn+nip)
# DCN + Trainable NIP
for dcn in 4k 8k 16k; do
$cmd --dir ./data/raw/$dir/dcn-nip+/$dcn --dcn $dcn --train nip $ln
done
;;
dcn+)
# Trainable DCN
for dcn in 4k 8k 16k; do
$cmd --dir ./data/raw/$dir/dcn+/$dcn --dcn $dcn --train dcn $lc
done
;;
*)
echo $"Usage: $0 {jpeg|dcn|dcn+nip|dcn+|jpeg+nip} rep [down]"
exit 1
esac