Git Product home page Git Product logo

daanet's Introduction

DAANet: Dual Ask-Answer Network for Machine Reading Comprehension

Python: 3.6 Tensorflow: 1.6

Requirements

  • Python >= 3.6
  • Tensorflow >= 1.6 (self-compiled TF-gpu is recommended!)
  • gputil >= 1.3.0
  • GPU

Usage

For dual learning run:

python grid_search.py daanet 

For QA-only model (corresponds to mono in the experiment) run:

python grid_search.py monoqa 

For QG-only model (corresponds to mono in the experiment) , run :

python grid_search.py monoqg 

All hyperparameters used in the paper are stored in default.yaml:

You can change the data path and save dir in grid.yaml

Evaluation

Evaluation on the dev set is automatically done after each epoch.

To do evaluation manually,

python app.py evaluate ~/save/models/DDMM-HHMMSS/default.yaml

, where ~/save/models/DDMM-HHMMSS/default.yaml is the saved yaml config of model DDMM-HHMMSS. It is created during the training procedure. It automatically loads the parameters from the best epoch (or fallback to the last epoch) to the model.

Continuous Training

python app.py train ~/save/models/DDMM-HHMMSS/default.yaml

It will load the best (or last) model so far and conducts incremental training.

Generated Samples

Selected outputs from DAANET and mono. Yellow text is question-related; green text is answer-related.

Attention Matrix

Question-Context and Answer Context attention matrices

daanet's People

Contributors

hanxiao avatar kashif avatar

Watchers

RAJ TOMAR avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.