-
Notifications
You must be signed in to change notification settings - Fork 4
/
train.sh
executable file
·73 lines (68 loc) · 1.53 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
export GPUID=0
export NET="squeezeSeg"
export IMAGE_SET="train"
export LOG_DIR="./log/"
export STEPS=60000
if [ $# -eq 0 ]
then
echo "Usage: ./scripts/train.sh [options]"
echo " "
echo "options:"
echo "-h, --help show brief help"
echo "-gpu gpu id"
echo "-image_set (train|val)"
echo "-log_dir Where to save logs."
echo "-steps Number of training steps."
exit 0
fi
while test $# -gt 0; do
case "$1" in
-h|--help)
echo "Usage: ./scripts/train.sh [options]"
echo " "
echo "options:"
echo "-h, --help show brief help"
echo "-gpu gpu id"
echo "-image_set (train|val)"
echo "-log_dir Where to save logs."
echo "-steps Number of training steps."
exit 0
;;
-gpu)
export GPUID="$2"
shift
shift
;;
-image_set)
export IMAGE_SET="$2"
shift
shift
;;
-log_dir)
export LOG_DIR="$2"
shift
shift
;;
-steps)
export STEPS="$2"
shift
shift
;;
*)
break
;;
esac
done
logdir="$LOG_DIR/"
python ./src/train.py \
--dataset=KITTI \
--pretrained_model_path=./data/pretrain_model/squeezenet_v1.1.pkl \
--data_path=./data/ \
--image_set=$IMAGE_SET \
--train_dir="$logdir/train" \
--net=$NET \
--max_steps=$STEPS \
--summary_step=200 \
--checkpoint_step=1000 \
--gpu=$GPUID