-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_ln.py
52 lines (45 loc) · 1.5 KB
/
run_ln.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
import numpy as np
import warnings
warnings.filterwarnings("ignore")
import importlib
import data, model, utils, evaluations, train, model_hp, data_hp, automations
import random
import os
# # This is for only if you have multiple GPUs
# # If you have multiple GPUs, then pick ONE for this code.
# os.environ["CUDA_VISIBLE_DEVICES"]= "0"
import tensorflow as tf
dict_MDN_hp = model_hp.dict_MDN_hp
dict_train_hp = model_hp.dict_train_hp
data_size_train = data_hp.data_size_train
data_size_test = data_hp.data_size_test
dict_ln = data_hp.dict_ln1
starting_from = False
dir_main = f'./saved_models/LogNormal_from_N_{starting_from}' ###
nakagami_or_lognormal = 'lognormal'
num_versions = 10
for version in range(num_versions):
# reset the random seed for every version since it's a sthochastic model
np.random.seed(random.randint(1, 10000))
# ln1 : urban
con_ln1 = data.LogNormal(
eta=dict_ln["eta"],
Pt=dict_ln["Pt"],
alpha_1=dict_ln["alpha_1"],
alpha_2=dict_ln["alpha_2"],
delta_1=dict_ln["delta_1"],
delta_2=dict_ln["delta_2"],
d_0=dict_ln["d_0"],
d_c=dict_ln["d_c"],
d_array=dict_ln["d_array"],
)
automations.automation_X1(
con=con_ln1,
dir_to_save=f"{dir_main}/{version}",
dict_MDN_hp=dict_MDN_hp,
dict_train_hp=dict_train_hp,
nakagami_or_lognormal=nakagami_or_lognormal,
data_size_train=data_size_train,
data_size_test=data_size_test,
starting_from=starting_from,
)