-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathrocket_basic_aac.sh
executable file
·57 lines (55 loc) · 1.32 KB
/
rocket_basic_aac.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
#!/usr/bin/env bash
BASEDIR=$(dirname "$( cd "$( dirname "$0" )" && pwd )")
if [ "$#" -ne 1 ]; then
echo "Usage: $0 [train|resume|test]"
exit 1
fi
COMMAND="$1"
MODEL=aac
CHECK_POINT=$BASEDIR/checkpoints/rocket_basic_aac_cp.pth
CONFIG=$BASEDIR/environments/rocket_basic.cfg
INSTANCE=basic
if [ $COMMAND == 'train' ]
then
python $BASEDIR/src/main.py \
--mode train \
--episode_size 20 \
--batch_size 20 \
--episode_discount 0.95 \
--model $MODEL \
--doom_instance $INSTANCE \
--vizdoom_config $CONFIG \
--skiprate 4 \
--frame_num 1 \
--checkpoint_file $CHECK_POINT \
--checkpoint_rate 100 \
--episode_num 500
elif [ $COMMAND == 'resume' ]
then
python $BASEDIR/src/main.py \
--mode train \
--episode_size 20 \
--batch_size 20 \
--episode_discount 0.95 \
--model $MODEL \
--load $CHECK_POINT \
--doom_instance $INSTANCE \
--vizdoom_config $CONFIG \
--skiprate 4 \
--frame_num 1 \
--checkpoint_file $CHECK_POINT \
--checkpoint_rate 100 \
--episode_num 5000
elif [ $COMMAND == 'test' ]
then
python $BASEDIR/src/main.py \
--mode test \
--model $MODEL \
--load $CHECK_POINT \
--doom_instance $INSTANCE \
--vizdoom_config $CONFIG \
--skiprate 1 \
--frame_num 1
else
echo "'$COMMAND' is unknown command."
fi