forked from TLESORT/Learning-State-Representation
-
Notifications
You must be signed in to change notification settings - Fork 2
/
train_predict_plotStates_gridSearch.sh
executable file
·56 lines (46 loc) · 2.15 KB
/
train_predict_plotStates_gridSearch.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
#!/bin/bash
# CONFIG OPTIONS:
# -use_cuda
# -use_continuous
# -params.sigma is CONTINUOUS_ACTION_SIGMA
# -params.mcd is MAX_COS_DIST_AMONG_ACTIONS_THRESHOLD
# -data_folder options: DATA_FOLDER (Dataset to use):
# staticButtonSimplest, mobileRobot, simpleData3D, pushingButton3DAugmented, babbling')
#data= staticButtonSimplest, mobileRobot, complexData colorful #staticButtonSimplest https://stackoverflow.com/questions/2459286/unable-to-set-variables-in-bash-script #"$data"='staticButtonSimplest'
function has_command_finished_correctly {
if [ "$?" -ne "0" ]
then
exit
else
return 0
fi
}
data_folder='nonStaticButton' #'complexData' #colorful75' #'mobileRobot' # 'complexData' #'colorful' #'staticButtonSimplest'
# TODO
#for dimension in 3 4 5 6 7 8 9 10 15 20
# losses result in being nan for MCD 0.9 and sigma 0.01
#for max_cos_dis in 0.01 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 #for max_cos_dis in 0.9
for max_cos_dis in 0.01 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.95 #0.4 0.5 0.8
do
#for s in 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
for s in 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 #0.2 0.4 0.5
do
echo " ********** Running pipeline for finetuning mcd: $max_cos_dis and sigma: $s *************"
qlua script.lua -use_cuda -use_continuous -mcd $max_cos_dis -sigma $s -data_folder $data_folder
has_command_finished_correctly
th imagesAndReprToTxt.lua -use_cuda -use_continuous -data_folder $data_folder
has_command_finished_correctly
python generateNNImages.py 10
# ----- Note: includes the call to:
# th create_all_reward.lua
# th create_plotStates_file_for_all_seq.lua
has_command_finished_correctly
python plotStates.py
has_command_finished_correctly
python report_results.py
has_command_finished_correctly
#python distortion_crit.py # short to compute, it's just that it doesn't seem to be very useful
#has_command_finished_correctly
done
done
# best so far in a 49 images dataset: modelY2017_D24_M06_H02M02S49_staticButtonSimplest_resnet_cont_MCD0_5_S0_1,0.222667244673