-
Notifications
You must be signed in to change notification settings - Fork 23
/
run_single_train_landcover.sh
executable file
·91 lines (74 loc) · 1.94 KB
/
run_single_train_landcover.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
LOSSES=(
"crossentropy"
"jaccard"
"superres"
)
MODEL_TYPES=(
"unet"
"unet_large"
"fcdensenet"
)
STATES=(
de_1m_2013
ny_1m_2013
md_1m_2013
pa_1m_2013
wv_1m_2014
va_1m_2014
)
GPU_ID=0
LOSS=${LOSSES[0]}
MODEL_TYPE=${MODEL_TYPES[0]}
BATCH_SIZE=16
LEARNING_RATE=0.001
TRAIN_STATE_LIST="md_1m_2013"
VAL_STATE_LIST="ny_1m_2013"
SUPERRES_STATE_LIST="ny_1m_2013"
EXP_NAME=CVPR-for_github-loss-${LOSS}-model-${MODEL_TYPE}-training_states-${TRAIN_STATE_LIST// /-}
OUTPUT=/results/train-output/
if [ -d "${OUTPUT}/${EXP_NAME}" ]; then
echo "Experiment ${OUTPUT}/${EXP_NAME} exists"
while true; do
read -p "Do you wish to overwrite this experiment? [y/n]" yn
case $yn in
[Yy]* ) rm -rf ${OUTPUT}/${EXP_NAME}; break;;
[Nn]* ) exit;;
* ) echo "Please answer y or n.";;
esac
done
fi
mkdir -p ${OUTPUT}/${EXP_NAME}/
cp -r *.sh *.py ${OUTPUT}/${EXP_NAME}/
LOG_FILE=${OUTPUT}/${EXP_NAME}/log.txt
echo ${LOG_FILE}
# unbuffer python -u train_model_landcover.py \
# --output ${OUTPUT} \
# --name ${EXP_NAME} \
# --gpu ${GPU_ID} \
# --verbose 1 \
# --data_dir /home/caleb/data/ \
# --training_states ${TRAIN_STATE_LIST} \
# --validation_states ${VAL_STATE_LIST} \
# --superres_states ${SUPERRES_STATE_LIST} \
# --model_type ${MODEL_TYPE} \
# --learning_rate ${LEARNING_RATE} \
# --loss ${LOSS} \
# --batch_size ${BATCH_SIZE} \
# &> ${LOG_FILE} &
# tail -f ${LOG_FILE}
python -u landcover/train_model_landcover.py \
--output ${OUTPUT} \
--name ${EXP_NAME} \
--gpu ${GPU_ID} \
--verbose 1 \
--data_dir /home/caleb/data/ \
--training_states ${TRAIN_STATE_LIST} \
--validation_states ${VAL_STATE_LIST} \
--superres_states ${SUPERRES_STATE_LIST} \
--model_type ${MODEL_TYPE} \
--learning_rate ${LEARNING_RATE} \
--loss ${LOSS} \
--batch_size ${BATCH_SIZE}
#wait;
exit