diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/bidirectional_window_1.py | 41 | ||||
-rw-r--r-- | config/bidirectional_window_1_momentum.py | 41 | ||||
-rw-r--r-- | config/dest_mlp_1_cswdtx_alexandre.py | 2 |
3 files changed, 83 insertions, 1 deletions
diff --git a/config/bidirectional_window_1.py b/config/bidirectional_window_1.py new file mode 100644 index 0000000..8dbf3c1 --- /dev/null +++ b/config/bidirectional_window_1.py @@ -0,0 +1,41 @@ +import os +import cPickle + +from blocks.algorithms import Momentum +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.bidirectional_tgtcls import Model, Stream + + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) + +dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('taxi_id', data.taxi_id_size, 10), +] + +hidden_state_dim = 100 + +dim_hidden = [500, 500] + +embed_weights_init = IsotropicGaussian(0.01) +weights_init = IsotropicGaussian(0.1) +biases_init = Constant(0.01) + +batch_size = 400 +batch_sort_size = 20 + +max_splits = 100 +train_max_len = 500 + +window_size = 5 + +# monitor_freq = 10000 # temporary, for finding good learning rate + +# step_rule= Momentum(learning_rate=0.001, momentum=0.9) + diff --git a/config/bidirectional_window_1_momentum.py b/config/bidirectional_window_1_momentum.py new file mode 100644 index 0000000..9925db1 --- /dev/null +++ b/config/bidirectional_window_1_momentum.py @@ -0,0 +1,41 @@ +import os +import cPickle + +from blocks.algorithms import Momentum +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.bidirectional_tgtcls import Model, Stream + + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) + +dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('taxi_id', data.taxi_id_size, 10), +] + +hidden_state_dim = 100 + +dim_hidden = [500, 500] + +embed_weights_init = IsotropicGaussian(0.01) +weights_init = IsotropicGaussian(0.1) +biases_init = Constant(0.01) + +batch_size = 400 +batch_sort_size = 20 + +max_splits = 100 +train_max_len = 500 + +window_size = 5 + +# monitor_freq = 10000 # temporary, for finding good learning rate + +step_rule= Momentum(learning_rate=0.001, momentum=0.9) + diff --git a/config/dest_mlp_1_cswdtx_alexandre.py b/config/dest_mlp_1_cswdtx_alexandre.py index 3c013e7..510c16e 100644 --- a/config/dest_mlp_1_cswdtx_alexandre.py +++ b/config/dest_mlp_1_cswdtx_alexandre.py @@ -28,7 +28,7 @@ embed_weights_init = IsotropicGaussian(0.01) mlp_weights_init = IsotropicGaussian(0.1) mlp_biases_init = Constant(0.01) -step_rule = Momentum(learning_rate=0.01, momentum=0.9) +step_rule = Momentum(learning_rate=0.001, momentum=0.9) batch_size = 200 |