-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheval.sh
57 lines (52 loc) · 1.49 KB
/
eval.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
#! /bin/sh
id=$1
method=$3
num_samples=$(($4-1))
resdir=/mnt/data/qingzhong/results
if [ ! -d $resdir/log_$id ]; then
mkdir $resdir/log_$id
fi
if [ ! -d $resdir/log_$id/$method ]; then
mkdir $resdir/log_$id/$method
fi
if [ ! -d $resdir/log_$id/beam_search ]; then
mkdir $resdir/log_$id/beam_search
fi
for VARIABLE in $(seq 0 $num_samples)
do
python eval.py \
--decoding_constraint 0 \
--dump_images 0 \
--num_images -1 \
--batch_size 50 \
--split $2 \
--input_label_h5 data/cocotalk_label.h5 \
--input_fc_dir ../data/cocotalk_fc \
--input_att_dir ../data/cocobu_att \
--model /mnt/data/qingzhong/RL_based_models/log_$id/model.pth \
--language_eval 1 \
--beam_size 0 \
--temperature 1.0 \
--sample_max 0 \
--infos_path /mnt/data/qingzhong/RL_based_models/log_$id/infos_$id.pkl \
--dump_file $resdir/log_$id/$method/results$VARIABLE.json
done
for VARIABLE in 3
do
python eval.py \
--decoding_constraint 0 \
--dump_images 0 \
--num_images -1 \
--batch_size 50 \
--split $2 \
--input_label_h5 data/cocotalk_label.h5 \
--input_fc_dir ../data/cocotalk_fc \
--input_att_dir ../data/cocobu_att \
--model /mnt/data/qingzhong/RL_based_models/log_$id/model.pth \
--language_eval 1 \
--beam_size $VARIABLE \
--temperature 1.0 \
--sample_max 1 \
--infos_path /mnt/data/qingzhong/RL_based_models/log_$id/infos_$id.pkl \
--dump_file $resdir/log_$id/beam_search/results_bs$VARIABLE.json
done