dest_mlp_2_cswdt.py (773B)
1 from blocks.initialization import IsotropicGaussian, Constant 2 3 import data 4 from model.dest_mlp import Model, Stream 5 6 7 n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory 8 9 dim_embeddings = [ 10 ('origin_call', data.origin_call_train_size, 10), 11 ('origin_stand', data.stands_size, 10), 12 ('week_of_year', 52, 10), 13 ('day_of_week', 7, 10), 14 ('qhour_of_day', 24 * 4, 10), 15 ('day_type', 3, 10), 16 ] 17 18 dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) 19 dim_hidden = [200, 100] 20 dim_output = 2 21 22 embed_weights_init = IsotropicGaussian(0.001) 23 mlp_weights_init = IsotropicGaussian(0.01) 24 mlp_biases_init = Constant(0.001) 25 26 learning_rate = 0.0001 27 momentum = 0.99 28 batch_size = 32 29 30 max_splits = 100