-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_train.sh
53 lines (41 loc) · 1.04 KB
/
run_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
set -e
source ~/.bashrc
function rand(){
min=$1
max=$(($2-$min+1))
num=$(date +%s%N)
echo $(($num%$max+$min))
}
if [ ! $GPU_NUM ]; then
GPU_NUM=1
fi
export MODEL_TYPE=EAI
export LR_ONE_EPOCH=0.001
export BATCHSZIE_ONE_EPOCH=64
export DATAPATH=./Dataset_GRAB
echo "GPU_NUM : " $GPU_NUM
echo "MODEL_TYPE : " $MODEL_TYPE
echo "LR : " $LR_ONE_EPOCH
echo "BATCHSZIE_ONE_EPOCH : " $BATCHSZIE_ONE_EPOCH
echo "DATAPATH : " $DATAPATH
rnd=$[$(rand 1 1000)+4231]
echo "RANDOM_PORT : " $rnd
EXPID=TRAIN_modeltype_${MODEL_TYPE}_batchsize_$[$BATCHSZIE_ONE_EPOCH]_lr_$LR_ONE_EPOCH
TESTEXPID=TEST_modeltype_${MODEL_TYPE}_batchsize_$[$BATCHSZIE_ONE_EPOCH]_lr_$LR_ONE_EPOCH
echo "EXPID : " $EXPID
python -u -m torch.distributed.launch \
--nproc_per_node=$GPU_NUM \
--master_port=$rnd \
train.py \
--input_n 30 \
--output 30 \
--all_n 60 \
--lr $LR_ONE_EPOCH \
--train_batch $[$BATCHSZIE_ONE_EPOCH*$GPU_NUM] \
--model_type $MODEL_TYPE \
--grab_data_dict $DATAPATH \
--is_exp \
--is_using_saved_file \
--is_using_noTpose2 \
--is_boneloss \
--exp $EXPID \