bidirectional_tgtcls_relu_1.py (783B)
1 import os 2 import cPickle 3 4 from blocks.bricks import Rectifier 5 from blocks.initialization import IsotropicGaussian, Constant 6 7 import data 8 from model.bidirectional_tgtcls import Model, Stream 9 10 11 with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) 12 13 dim_embeddings = [ 14 ('origin_call', data.origin_call_train_size, 10), 15 ('origin_stand', data.stands_size, 10), 16 ('week_of_year', 52, 10), 17 ('day_of_week', 7, 10), 18 ('qhour_of_day', 24 * 4, 10), 19 ('taxi_id', data.taxi_id_size, 10), 20 ] 21 22 rec_activation = Rectifier 23 24 hidden_state_dim = 100 25 26 dim_hidden = [500, 500] 27 28 embed_weights_init = IsotropicGaussian(0.01) 29 weights_init = IsotropicGaussian(0.1) 30 biases_init = Constant(0.01) 31 32 batch_size = 100 33 batch_sort_size = 20 34 35 max_splits = 100 36