-
Notifications
You must be signed in to change notification settings - Fork 1
/
UCR_looping_runner.py
54 lines (40 loc) · 1.82 KB
/
UCR_looping_runner.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
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import numpy as np
from random import Random
from tensorflow.contrib import rnn
from tensorflow.python.framework import ops
import os
from UCR_time_series_data_handler import get_dataset_with_series_size, direc
import lstm_mnist
import single_layer_lstm_looper_UCR
def get_immediate_subdirectories(a_dir):
return [name for name in os.listdir(a_dir)
if os.path.isdir(os.path.join(a_dir, name))]
def get_dataset_list():
return get_immediate_subdirectories(direc)
def run_with_dataset(dataset):
pass
def modify_config_wtih_current_dataset(config):
pass
run_with_config = single_layer_lstm_looper_UCR.run_with_config
config = single_layer_lstm_looper_UCR.config
def looper_runner(UCR_dataset_name):
run_with_config(config)
if __name__ == '__main__':
print (get_dataset_list())
exit(0)
run_with_config = single_layer_lstm_looper_UCR.run_with_config
config = single_layer_lstm_looper_UCR.config
for learning_rate in [0.005, 0.0025, 0.003, 0.0005]: # 1, 0.0025, 0.002]: # [0.01, 0.007, 0.001, 0.0007, 0.0001]:
for decay in [0.9]: # [0.005, 0.01]:
for bn_enabled in [True, False]:
for n_stacked in [2, 3, 4, 6]: # 2 3 6
for epoch_count in [200, 300, 350]:
config.training_epochs = epoch_count
config.tensor_board_logging_enabled = False # should be always False, log summary folder gets impacted by mulitple runs
config.n_stacked_layers = n_stacked
config.batch_norm_enabled = bn_enabled
config.learning_rate = learning_rate
config.decay = decay
run_with_config(config) # , trX, trY, teX, teY)