Skip to content

Commit

Permalink
setup regexps
Browse files Browse the repository at this point in the history
  • Loading branch information
phildue committed Jun 17, 2018
1 parent ddf5414 commit c417cb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 46 deletions.
2 changes: 1 addition & 1 deletion experiments/final.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

batch_size = 8
n_stations = 41
radius = 1000
radius = 500
t_train_h = 7 * 24
t_pred_d = 3
t_pred_resolution_h = 1
Expand Down
48 changes: 3 additions & 45 deletions experiments/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
n_dense_pre = 3
n_node = 1.0
act = 'relu'
n_memory = 1
n_memory = 2
n_dense_pos = 3
memory_units = ['lstm', 'gru']
reg = None
Expand Down Expand Up @@ -61,7 +61,7 @@
n_dense_pos = 3
n_node = 1.0
acts = 'relu', 'leaky_relu', 'tanh'
n_memory = 1
n_memory = 2
n_dense_pre = 3
memory_unit = 'lstm'
reg = None
Expand Down Expand Up @@ -104,7 +104,7 @@
n_nodes = 1.0
act = 'relu'
regs = ['Dropout50', 'Dropout25', 'l1', 'l2']
n_memory = 1
n_memory = 2
n_dense_pre = 3
n_dense_pos = 3
memory_unit = 'lstm'
Expand Down Expand Up @@ -141,45 +141,3 @@
features_predict=features_predict,
)

"""
Experiment III: Depth
"""
n_nodes = 1.0
act = 'relu'
reg = None
n_memorys = [1, 2, 4, 8]
n_dense_pres = [1, 2, 4, 8]
n_dense_poss = [1, 2, 4, 8]
memory_unit = 'lstm'
for i in range(len(n_memorys)):
model = create_model(batch_size=batch_size,
t_train=t_train_h,
t_pred=int(t_pred_d * 24 / t_pred_resolution_h),
n_features_train=len(features_train),
n_stations=n_stations,
memory_unit=memory_unit,
width=n_dense_pre,
n_layers_memory=n_memorys[i],
n_layers_preprocessing=n_dense_pres[i],
n_layers_postprocessing=n_dense_poss[i],
n_features_pred=len(features_predict),
activation=act,
mask_value=MASK_VALUE,
regularization=reg)

# '{layer_pre}x{n_nodes}*{act}->[{memory}]{n_lstm}->{layer_pos}{n_nodes}*{act}'
log_dir = 'out/{}-{}-{}-{}{}-{}-{}-{}'.format(n_dense_pre, int(n_node * 10), act, memory_unit, n_memory,
n_dense_pos, int(n_stations / n_dense_pre), act)

train(radius=radius,
batch_size=batch_size,
log_dir=log_dir,
t_train_h=t_train_h,
t_pred_d=t_pred_d,
t_pred_resolution_h=t_pred_resolution_h,
model_name=model,
filenames_train=filenames_train,
filenames_valid=filenames_valid,
features_train=features_train,
features_predict=features_predict,
)

0 comments on commit c417cb2

Please sign in to comment.