forked from yangyanli/PointCNN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrain_val_shapenet.sh
executable file
·49 lines (40 loc) · 965 Bytes
/
train_val_shapenet.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
#!/usr/bin/env bash
gpu=
setting=
models_folder="../../models/seg/"
train_files="../../data/shapenet_partseg/train_val_files.txt"
val_files="../../data/shapenet_partseg/test_files.txt"
usage() { echo "train/val pointcnn_seg with -g gpu_id -x setting options"; }
gpu_flag=0
setting_flag=0
while getopts g:x:h opt; do
case $opt in
g)
gpu_flag=1;
gpu=$(($OPTARG))
;;
x)
setting_flag=1;
setting=${OPTARG}
;;
h)
usage; exit;;
esac
done
shift $((OPTIND-1))
if [ $gpu_flag -eq 0 ]
then
echo "-g option is not presented!"
usage; exit;
fi
if [ $setting_flag -eq 0 ]
then
echo "-x option is not presented!"
usage; exit;
fi
if [ ! -d "$models_folder" ]
then
mkdir -p "$models_folder"
fi
echo "Train/Val with setting $setting on GPU $gpu!"
CUDA_VISIBLE_DEVICES=$gpu python3 ../train_val_seg.py -t $train_files -v $val_files -s $models_folder -m pointcnn_seg -x $setting > $models_folder/pointcnn_seg_$setting.txt 2>&1 &