aboutsummaryrefslogtreecommitdiff
path: root/config/bidirectional_tgtcls_1_momentum.py
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-07-25 14:19:22 -0400
committerAlex Auvolat <alex.auvolat@ens.fr>2015-07-25 14:19:22 -0400
commit5e216e8c5197568c39029793ebafc4df50215cae (patch)
treee8d1570abc119be7d30f6882050d3d5982d0e5fb /config/bidirectional_tgtcls_1_momentum.py
parente1e2ff095a14d93e99960330a666c4d9a8fdf0ac (diff)
downloadtaxi-5e216e8c5197568c39029793ebafc4df50215cae.tar.gz
taxi-5e216e8c5197568c39029793ebafc4df50215cae.zip
Add bidirectional_tgtcls_1_momentum
Diffstat (limited to 'config/bidirectional_tgtcls_1_momentum.py')
-rw-r--r--config/bidirectional_tgtcls_1_momentum.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/config/bidirectional_tgtcls_1_momentum.py b/config/bidirectional_tgtcls_1_momentum.py
new file mode 100644
index 0000000..5e28744
--- /dev/null
+++ b/config/bidirectional_tgtcls_1_momentum.py
@@ -0,0 +1,36 @@
+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 = 100
+batch_sort_size = 20
+
+max_splits = 100
+
+step_rule= Momentum(learning_rate=0.01, momentum=0.9)
+