From 9013799ebca1c426c3c3e9019eb71018b253b025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Simon?= Date: Tue, 21 Jul 2015 21:08:35 -0400 Subject: Add bidirectional --- config/bidirectional_1.py | 31 +++++++++++++++++++++++++++++++ config/bidirectional_tgtcls_1.py | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 config/bidirectional_1.py create mode 100644 config/bidirectional_tgtcls_1.py (limited to 'config') diff --git a/config/bidirectional_1.py b/config/bidirectional_1.py new file mode 100644 index 0000000..8691357 --- /dev/null +++ b/config/bidirectional_1.py @@ -0,0 +1,31 @@ +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.bidirectional_tgtcls import Model, Stream + + +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', 448, 10), +] + +hidden_state_dim = 100 + +dim_hidden = [500, 500] + +embed_weights_init = IsotropicGaussian(0.01) +fork_weights_init = IsotropicGaussian(0.1) +fork_biases_init = Constant(0.01) +rec_weights_init = IsotropicGaussian(0.1) +mlp_weights_init = IsotropicGaussian(0.1) +mlp_biases_init = Constant(0.01) + +batch_size = 20 +batch_sort_size = 20 + +valid_set = 'cuts/large_valid' +max_splits = 100 diff --git a/config/bidirectional_tgtcls_1.py b/config/bidirectional_tgtcls_1.py new file mode 100644 index 0000000..4c9ed3e --- /dev/null +++ b/config/bidirectional_tgtcls_1.py @@ -0,0 +1,36 @@ +import os +import cPickle + +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', 448, 10), +] + +hidden_state_dim = 100 + +dim_hidden = [500, 500] + +embed_weights_init = IsotropicGaussian(0.01) +fork_weights_init = IsotropicGaussian(0.1) +fork_biases_init = Constant(0.01) +rec_weights_init = IsotropicGaussian(0.1) +mlp_weights_init = IsotropicGaussian(0.1) +mlp_biases_init = Constant(0.01) + +batch_size = 20 +batch_sort_size = 20 + +valid_set = 'cuts/large_valid' +max_splits = 100 -- cgit v1.2.3