-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_custom_file_names.py
79 lines (53 loc) · 3.98 KB
/
make_custom_file_names.py
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# MASTER file for setting up different experiments
# - Defines key parameters that might change between experiments.
# - Generates file names with key parameters.
################################################################
def main_string( IS_UNET, n_encoder_decoder_layers, nepochs):
if IS_UNET:
my_string = 'UNET' # using Unet
else:
my_string = 'SEQ' # using standard sequential architecture (no skip connections)
my_string = my_string + '_blocks_' + repr(n_encoder_decoder_layers) + '_epochs_' + repr(nepochs)
return my_string
################################################################
################################################################
def data_file_name( spath, suffix='' ):
data_file = spath+'/DATA_SCALED/conus'+suffix+'.npz'
return data_file
################################################################
def model_file_name( spath, IS_UNET, my_file_prefix, n_encoder_decoder_layers, nepochs ):
file_name = spath+'/OUTPUT/MODEL/model_' + my_file_prefix + '_' + main_string( IS_UNET, n_encoder_decoder_layers, nepochs) + '.h5'
return file_name
################################################################
def history_file_name( spath, IS_UNET, my_file_prefix, n_encoder_decoder_layers, nepochs ):
file_name = spath+'/OUTPUT/MODEL/history_' + my_file_prefix + '_' + main_string( IS_UNET, n_encoder_decoder_layers, nepochs) + '.bin'
return file_name
################################################################
def predictions_file_name( spath, IS_UNET, my_file_prefix, n_encoder_decoder_layers, nepochs ):
file_name = spath+'/OUTPUT/PREDICTIONS/predictions_' + my_file_prefix + '_' + main_string( IS_UNET, n_encoder_decoder_layers, nepochs) + '.bin'
return file_name
###############################################################
def convergence_plot_file_name( spath, IS_UNET, my_file_prefix, n_encoder_decoder_layers, nepochs ):
file_name = spath+'/OUTPUT/FIGURES/CONVERGENCE/convergence_' + my_file_prefix + '_' + main_string( IS_UNET, n_encoder_decoder_layers, nepochs) + '.png'
return file_name
################################################################
def prediction_plot_file_name_start( spath, IS_UNET, my_file_prefix, n_encoder_decoder_layers, nepochs):
file_name_start = spath+'/OUTPUT/FIGURES/PREDICTIONS/prediction_' + my_file_prefix + '_' + main_string( IS_UNET, n_encoder_decoder_layers, nepochs)
return file_name_start
################################################################
def feature_map_file_name_start(spath,IS_UNET, my_file_prefix, n_encoder_decoder_layers, nepochs):
file_name_start = spath+'/OUTPUT/FIGURES/FEATURE_MAPS/feature_map_' + my_file_prefix + '_' + main_string( IS_UNET, n_encoder_decoder_layers, nepochs)
return file_name_start
################################################################
def heat_map_file_name_start(spath,IS_UNET, my_file_prefix, n_encoder_decoder_layers, nepochs):
file_name_start = spath+'/OUTPUT/FIGURES/HEAT_MAPS/heat_map_' + my_file_prefix + '_' + main_string( IS_UNET, n_encoder_decoder_layers, nepochs)
return file_name_start
################################################################
def backward_optimization_file_name_start(spath,IS_UNET, my_file_prefix, n_encoder_decoder_layers, nepochs):
file_name_start = spath+'/OUTPUT/FIGURES/BACKWARD_OPTIMIZATION/backward_optimization_' + my_file_prefix + '_' + main_string( IS_UNET, n_encoder_decoder_layers, nepochs)
return file_name_start
################################################################
def input_patches_file_name_start(spath,IS_UNET, my_file_prefix, n_encoder_decoder_layers, nepochs):
file_name_start = spath+'/OUTPUT/FIGURES/INPUT_PATCHES/input_patches_' + my_file_prefix + '_' + main_string( IS_UNET, n_encoder_decoder_layers, nepochs)
return file_name_start
################################################################