-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtrain.sh
34 lines (26 loc) · 870 Bytes
/
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
#!/bin/sh
PARTITION=Segmentation
GPU_ID=0 #,1,2,3
dataset=coco # pascal coco
exp_name=split0
arch=ourmodel
net=resnet50 # vgg resnet50
exp_dir=exp/${dataset}/${arch}/${exp_name}/${net}
snapshot_dir=${exp_dir}/snapshot
result_dir=${exp_dir}/result
config=config/${dataset}/${dataset}_${exp_name}_${net}.yaml
mkdir -p ${snapshot_dir} ${result_dir}
now=$(date +"%Y%m%d_%H%M%S")
cp train.sh train.py ${config} ${exp_dir}
echo ${arch}
echo ${config}
# CUDA_VISIBLE_DEVICES=${GPU_ID} python -m torch.distributed.launch --nproc_per_node=2 --master_port=1234 train.py \
# --config=${config} \
# --arch=${arch} \
# 2>&1 | tee ${result_dir}/train-$now.log
CUDA_VISIBLE_DEVICES=${GPU_ID} python -u train.py \
--config=${config} \
--arch=${arch} \
2>&1 | tee ${result_dir}/train-$now.log
#Turn on tensorboardX recording
#--viz \