diff options
author | Étienne Simon <esimon@esimon.eu> | 2015-06-11 16:28:36 -0400 |
---|---|---|
committer | Étienne Simon <esimon@esimon.eu> | 2015-06-11 16:28:36 -0400 |
commit | db0e57fc2a351cedef3b1270bf6047e9cae9fa9d (patch) | |
tree | fc6a42a5c91611b3b3ade2bd67e03f8791b49821 /config/rnn_1.py | |
parent | b44f7113c64568a20c9f93ca17577f17d7695dcb (diff) | |
download | taxi-db0e57fc2a351cedef3b1270bf6047e9cae9fa9d.tar.gz taxi-db0e57fc2a351cedef3b1270bf6047e9cae9fa9d.zip |
Add basic RNN
Diffstat (limited to 'config/rnn_1.py')
-rw-r--r-- | config/rnn_1.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/config/rnn_1.py b/config/rnn_1.py new file mode 100644 index 0000000..5bc62d8 --- /dev/null +++ b/config/rnn_1.py @@ -0,0 +1,33 @@ +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.rnn import Model, Stream + +class EmbedderConfig(object): + __slots__ = ('dim_embeddings', 'embed_weights_init') + +pre_embedder = EmbedderConfig() +pre_embedder.embed_weights_init = IsotropicGaussian(0.001) +pre_embedder.dim_embeddings = [ + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +post_embedder = EmbedderConfig() +post_embedder.embed_weights_init = IsotropicGaussian(0.001) +post_embedder.dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10), +] + + +hidden_state_dim = 100 +weights_init = IsotropicGaussian(0.01) +biases_init = Constant(0.001) + +batch_size = 10 +batch_sort_size = 10 +valid_set = 'cuts/test_times_0' |