-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathtrain.sh
executable file
·54 lines (48 loc) · 1.15 KB
/
train.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
if (( $# != 1 )); then
echo "Usage: ./train.sh [0-2], e.g. ./train.sh 2"
exit
fi
hier=$1
modeldir=model
train="data/train"
eval="data/eval"
train_mv="data/train_mv"
eval_mv="data/eval_mv"
if [[ ${hier} == "0" ]]; then
distance1=6
distance2=6
bits=16
encoder_fuse_level=1
decoder_fuse_level=1
elif [[ ${hier} == "1" ]]; then
distance1=3
distance2=3
bits=16
encoder_fuse_level=2
decoder_fuse_level=3
elif [[ ${hier} == "2" ]]; then
distance1=1
distance2=2
bits=8
encoder_fuse_level=1
decoder_fuse_level=1
else
echo "Usage: ./train.sh [0-2], e.g. ./train.sh 2"
exit
fi
# Warning: with --save-out-img, output images are stored
# each time we run evaluation. This can take a lot of space
# when using a big evaluation dataset.
# (for the demo data it's okay.)
python -u train.py \
--train ${train} \
--eval ${eval} \
--train-mv ${train_mv} \
--eval-mv ${eval_mv} \
--encoder-fuse-level ${encoder_fuse_level} \
--decoder-fuse-level ${decoder_fuse_level} \
--v-compress --warp --stack --fuse-encoder \
--bits ${bits} \
--distance1 ${distance1} --distance2 ${distance2} \
--max-train-iters 100 \
--save-out-img