Code Monkey home page Code Monkey logo

qa_rnn's Introduction

Teaching Machine to Answer Question Using Recurrent Neural Networks and Attentive Reader

Tensorflow implementation of [Text Understanding with the Attention Sum Reader Network] https://arxiv.org/abs/1603.01547 with reference to

[Teaching Machines to Read and Comprehend] https://arxiv.org/abs/1506.03340

and [A Thorough Examination of the CNN/Daily Mail Reading Comprehension Task] https://arxiv.org/abs/1606.02858

The dataset is based on the paper [Towards AI-Complete Question Answering: A Set of Prerequisite Toy Tasks] https://arxiv.org/abs/1502.05698

Prerequisites

Usage

To train a model from scratch (ifcontinue==False indicates this is a new model, data_type is the type of the tasks you want to train on and is between 1-20)

$ python QAtrain_weights.py --data_path=./tasks_1-20_v1-2/en/ --model=small --ifcontinue=False --data_type=1

To continue to train a model(ifcontinue==True indicates continuing to train an existing model, data_type is the type of the tasks you want to train on and is between 1-20)

$ python QAtrain_weights.py --data_path=./tasks_1-20_v1-2/en/ --model=small --ifcontinue=True --data_type=1

To test an existing model (data_type is the type of the tasks and is between 1-20):

$ python QAanswer.py --data_path=./tasks_1-20_v1-2/en/ --model=small --data_type=1

Credit

Modified codes based on TensorFlow official tutorial on RNN https://www.tensorflow.org/tutorials/recurrent

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.