-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfiguration.py
37 lines (31 loc) · 1.26 KB
/
configuration.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
import yaml
# Load config file
with open('config.yaml') as f:
config = yaml.load(f, Loader=yaml.FullLoader)
# Access hyperparameters
num_epochs = config['num_epochs']
seed = config['seed']
#datasets
Noise_division_factor = config['datasets']['Noise_division_factor']
#loss
alpha = config['loss']['alpha']
Eigen = config['loss']['Eigen']
# Access model architecture parameters
model_name = config['model']['name']
prediction_horizon = config['model']['prediction_horizon']
prediction_input_size = config['model']['prediction_input_size']
# Encoder
Inception_NumLayers = config['model']['Inception_NumLayers']
#Koopman
Koopman_prediction_horizon= config['model']['Koopman_prediction_horizon']
# Decoder
RNN_NumLayer = config['model']['RNN_NumLayer']
# Access optimizer parameters
optimizer_name = config['optimizer']['name']
weight_decay = config['optimizer']['weight_decay']
opt_momentum = config['optimizer']['momentum']
# Access scheduler parameters
scheduler_name = config['scheduler']['name']
learning_rate = config['scheduler']['learning_rate']
step_size = config['scheduler']['step_size']
gamma = config['scheduler']['gamma']