localminimum / QANet

A Tensorflow implementation of QANet for machine reading comprehension
MIT License
982 stars 310 forks source link

why did u add this kind of dropout in every residual block #56

Open xiongma opened 5 years ago

xiongma commented 5 years ago

def layer_dropout(inputs, residual, dropout): pred = tf.random_uniform([]) < dropout return tf.cond(pred, lambda: residual, lambda: tf.nn.dropout(inputs, 1.0 - dropout) + residual)

xiongma commented 5 years ago

@localminimum hope you can reply this, thx