forked from lilianweng/stock-rnn
-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.py
30 lines (23 loc) · 659 Bytes
/
config.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
class RNNConfig():
input_size = 1
num_steps = 30
lstm_size = 128
num_layers = 1
keep_prob = 0.8
batch_size = 64
init_learning_rate = 0.001
learning_rate_decay = 0.99
init_epoch = 5
max_epoch = 50
def to_dict(self):
dct = self.__class__.__dict__
return {k: v for k, v in dct.iteritems() if not k.startswith('__') and not callable(v)}
def __str__(self):
return str(self.to_dict())
def __repr__(self):
return str(self.to_dict())
DEFAULT_CONFIG = RNNConfig()
print "Default configuration:", DEFAULT_CONFIG.to_dict()
DATA_DIR = "data"
LOG_DIR = "logs"
MODEL_DIR = "models"