Skip to content

2cat/QAnetEstimator

 
 

Repository files navigation

QAnetEstimator

a implementation of google QAnet, a tensorflow estimator version, have very good proved performance

overview

A Tensorflow implementation of Google's QANet. thanks nlplearn a lot, some implementation details came from their work. but overall, this is a whole new version using estimator-api, dataset-api and layers-api. these can make code more concise and clear and I've done extra processing on padding to ensure that the padding data doesn't pollute the normal input data in the neural network. I've got higher F1 and EM under the same suite parameter than nlplearn's version

Requirements

  • Python>=3.5
  • TensorFlow>=1.10

Usage

I use a parameter to switch models (there is a bidaf flow model inside) 
--procedure "wordembedding","QAnetEmbedding","dcn","QaModelBlock","QAOutput" 
using this procedure, a qanet is built.

todo

add elmo to replace embedding layer

Result

The dataset used for this task is Stanford Question Answering Dataset I did not use it directly, but copy my network to nlplearn's qanet, you can see the replacement in my fork version ,and the comparison of result is shown below

nlplearn's em 

ulplearn em

nlplearn's f1

f1

my version's em

em

my version's f1

f1

About

a implementation of google QAnet, a tensorflow estimator version, have very good proved performance

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%