-
Notifications
You must be signed in to change notification settings - Fork 5
/
train_random_sampling.sh
61 lines (45 loc) · 2.22 KB
/
train_random_sampling.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
# !/bin/bash
echo " Running Training EXP"
CUDA_ID=$1
if [ -z "$CUDA_ID" ]
then
echo "CUDA_ID is empty"
CUDA_ID=0
else
echo "CUDA_ID is set"
fi
echo $CUDA_ID
export CUDA_VISIBLE_DEVICES=$CUDA_ID
LR=0.001
EPOCH=500
LR_RATE=10
SAMPLING=local
LOSS=nce
HORIZON=4
TAG_PREFIX=random-sampling
# eth
WEIGHT=0.05
TEMP=0.20
python3 train.py --lr ${LR} --n_stgcnn 1 --n_txpcnn 5 --dataset eth --tag ${TAG_PREFIX}-social-stgcnn-eth --contrast_weight ${WEIGHT} --contrast_temperature ${TEMP} --contrast_horizon ${HORIZON} --contrast_sampling ${SAMPLING} --contrast_loss ${LOSS} --num_epochs ${EPOCH} --use_lrschd --lr_sh_rate ${LR_RATE} --safe_traj && echo "eth Launched." &
P0=$!
# hotel
WEIGHT=0.2
TEMP=0.20
python3 train.py --lr ${LR} --n_stgcnn 1 --n_txpcnn 5 --dataset hotel --tag ${TAG_PREFIX}-social-stgcnn-hotel --contrast_weight ${WEIGHT} --contrast_temperature ${TEMP} --contrast_horizon ${HORIZON} --contrast_sampling ${SAMPLING} --contrast_loss ${LOSS} --num_epochs ${EPOCH} --use_lrschd --lr_sh_rate ${LR_RATE} --safe_traj && echo "hotel Launched." &
P1=$!
# univ
WEIGHT=0.05
TEMP=0.10
python3 train.py --lr ${LR} --n_stgcnn 1 --n_txpcnn 5 --dataset univ --tag ${TAG_PREFIX}-social-stgcnn-univ --contrast_weight ${WEIGHT} --contrast_temperature ${TEMP} --contrast_horizon ${HORIZON} --contrast_sampling ${SAMPLING} --contrast_loss ${LOSS} --num_epochs ${EPOCH} --use_lrschd --lr_sh_rate ${LR_RATE} --safe_traj && echo "univ Launched." &
P2=$!
# zara1
WEIGHT=0.2
TEMP=0.10
python3 train.py --lr ${LR} --n_stgcnn 1 --n_txpcnn 5 --dataset zara1 --tag ${TAG_PREFIX}-social-stgcnn-zara1 --contrast_weight ${WEIGHT} --contrast_temperature ${TEMP} --contrast_horizon ${HORIZON} --contrast_sampling ${SAMPLING} --contrast_loss ${LOSS} --num_epochs ${EPOCH} --use_lrschd --lr_sh_rate ${LR_RATE} --safe_traj && echo "zara1 Launched." &
P3=$!
# zara2
WEIGHT=0.05
TEMP=0.10
python3 train.py --lr ${LR} --n_stgcnn 1 --n_txpcnn 5 --dataset zara2 --tag ${TAG_PREFIX}-social-stgcnn-zara2 --contrast_weight ${WEIGHT} --contrast_temperature ${TEMP} --contrast_horizon ${HORIZON} --contrast_sampling ${SAMPLING} --contrast_loss ${LOSS} --num_epochs ${EPOCH} --use_lrschd --lr_sh_rate ${LR_RATE} --safe_traj && echo "zara2 Launched." &
P4=$!
wait $P0 $P1 $P2 $P3 $P4