deep_question_answering

Implementation of "Teaching Machines to Read and Comprehend" proposed by Google DeepMind
git clone https://esimon.eu/repos/deep_question_answering.git
Log | Files | Refs | README | LICENSE

deepmind_deep_lstm.py (701B)


      1 from blocks.algorithms import BasicMomentum, AdaDelta, RMSProp, Adam, CompositeRule, StepClipping
      2 from blocks.initialization import IsotropicGaussian, Constant
      3 
      4 from model.deep_lstm import Model
      5 
      6 
      7 batch_size = 32
      8 sort_batch_count = 20
      9 
     10 shuffle_questions = True
     11 
     12 concat_ctx_and_question = True
     13 concat_question_before = True
     14 
     15 embed_size = 200
     16 
     17 lstm_size = [256, 256]
     18 skip_connections = True
     19 
     20 out_mlp_hidden = []
     21 out_mlp_activations = []
     22 
     23 step_rule = CompositeRule([RMSProp(decay_rate=0.95, learning_rate=1e-4),
     24                            BasicMomentum(momentum=0.9)])
     25 
     26 dropout = 0.1
     27 
     28 valid_freq = 1000
     29 save_freq = 1000
     30 print_freq = 100
     31 
     32 weights_init = IsotropicGaussian(0.01)
     33 biases_init = Constant(0.)