time_mlp_2_cswdtx.py (816B)
1 from blocks.initialization import IsotropicGaussian, Constant 2 3 import data 4 from model.time_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 ('taxi_id', 448, 10), 17 ] 18 19 dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) 20 dim_hidden = [500, 100] 21 dim_output = 1 22 23 embed_weights_init = IsotropicGaussian(0.001) 24 mlp_weights_init = IsotropicGaussian(0.01) 25 mlp_biases_init = Constant(0.001) 26 27 exp_base = 1.5 28 29 learning_rate = 0.00001 30 momentum = 0.99 31 batch_size = 32 32 33 max_splits = 100