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