All Projects → uwnlp → Qrn

uwnlp / Qrn

Licence: mit
Query-Reduction Networks (QRN)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Qrn

hcn
Hybrid Code Networks https://arxiv.org/abs/1702.03274
Stars: ✭ 81 (-40.88%)
Mutual labels:  dialog, rnn
dialogbot
dialogbot, provide search-based dialogue, task-based dialogue and generative dialogue model. 对话机器人,基于问答型对话、任务型对话、聊天型对话等模型实现,支持网络检索问答,领域知识问答,任务引导问答,闲聊问答,开箱即用。
Stars: ✭ 96 (-29.93%)
Mutual labels:  qa, dialog
R Net
A Tensorflow Implementation of R-net: Machine reading comprehension with self matching networks
Stars: ✭ 321 (+134.31%)
Mutual labels:  rnn, qa
AVSD-DSTC10 Official
Audio Visual Scene-Aware Dialog (AVSD) Challenge at the 10th Dialog System Technology Challenge (DSTC)
Stars: ✭ 22 (-83.94%)
Mutual labels:  qa, dialog
Attention Over Attention Tf Qa
论文“Attention-over-Attention Neural Networks for Reading Comprehension”中AoA模型实现
Stars: ✭ 58 (-57.66%)
Mutual labels:  rnn, qa
Midi Rnn
Generate monophonic melodies with machine learning using a basic LSTM RNN
Stars: ✭ 124 (-9.49%)
Mutual labels:  rnn
Neuraldialog Zsdg
PyTorch codebase for zero-shot dialog generation SIGDIAL 2018, It is released by Tiancheng Zhao (Tony) from Dialog Research Center, LTI, CMU
Stars: ✭ 131 (-4.38%)
Mutual labels:  dialog
Rnn From Scratch
Use tensorflow's tf.scan to build vanilla, GRU and LSTM RNNs
Stars: ✭ 123 (-10.22%)
Mutual labels:  rnn
Foot traffic
Pure Ruby DSL for Chrome scripting based on Ferrum. No Selenium required. Works from any script. Simulate web app usage scenarios in production or locally.
Stars: ✭ 123 (-10.22%)
Mutual labels:  qa
Djsemimodalviewcontroller
Simple semi modal presentation dialog with stacked content
Stars: ✭ 137 (+0%)
Mutual labels:  dialog
Rnn recsys
Our implementation of the paper "Embedding-based News Recommendation for Millions of Users"
Stars: ✭ 135 (-1.46%)
Mutual labels:  rnn
Vue Final Modal
🍕Vue Final Modal is a tiny, renderless, mobile-friendly, feature-rich modal component for Vue.js.
Stars: ✭ 128 (-6.57%)
Mutual labels:  dialog
Dialog corpus
用于训练中英文对话系统的语料库 Datasets for Training Chatbot System
Stars: ✭ 1,662 (+1113.14%)
Mutual labels:  dialog
React Native Material Dialog
Material design dialogs for React Native 💬
Stars: ✭ 135 (-1.46%)
Mutual labels:  dialog
Kaggle Web Traffic
1st place solution
Stars: ✭ 1,641 (+1097.81%)
Mutual labels:  rnn
Noty
A simple library for creating animated warnings/dialogs/alerts for Android.
Stars: ✭ 136 (-0.73%)
Mutual labels:  dialog
A Convolutional Recurrent Neural Network For Real Time Speech Enhancement
A minimum unofficial implementation of the "A Convolutional Recurrent Neural Network for Real-Time Speech Enhancement" (CRN) using PyTorch
Stars: ✭ 123 (-10.22%)
Mutual labels:  rnn
Chinese Chatbot
中文聊天机器人,基于10万组对白训练而成,采用注意力机制,对一般问题都会生成一个有意义的答复。已上传模型,可直接运行,跑不起来直播吃键盘。
Stars: ✭ 124 (-9.49%)
Mutual labels:  rnn
Lstm Crypto Price Prediction
Predicting price trends in cryptomarkets using an lstm-RNN for the use of a trading bot
Stars: ✭ 136 (-0.73%)
Mutual labels:  rnn
Flutter Shopping Airi
一款基于Flutter开发的购物App,涵盖了购物App的常见功能
Stars: ✭ 128 (-6.57%)
Mutual labels:  dialog

Query-Reduction Networks (QRN)

Teaser figure for QRN QRN is a purely sequential model like LSTM or GRU (but simpler than them) for story-based question answering (bAbI QA tasks). QRN is implemented using TensorFlow. Here are some notable results (error rates in %) on bAbI QA dataset:

Task LSTM MemN2N Ours
1k avg 51.3 15.2 9.9
10k avg 36.4 4.2 0.3

See model details and more results in this paper.

1. Quick Start

We are assuming you are working in a Linux environment. Make sure that you have Python (verified on 3.5, issues have been reported with 2.x), and you installed these Python packages: tensorflow (>=0.8, <=0.11, issues have been reported with >=0.12) and progressbar2.

First, download bAbI QA dataset (note that this downloads the dataset to $HOME/data/babi):

chmod +x download.sh; ./download.sh 

Then preprocess the data for a particular task, say Task 2 (this stores the preprocessed data in data/babi/en/02/):

python -m prepro --task 2

Finally, you train the model (test is automatically performed at the end):

python -m babi.main --noload --task 2

It took ~3 minutes on my laptop using CPU.

You can run it several times with new weight initialization (e.g. 10) and report the test result with the lowest dev loss:

python -m babi.main --noload --task 2 --num_trials 10

This is critical to stably get the reported results; some weight initialization leads to a bad optima.

2. Visualizing Results

After training and testing, the result is stored in evals/babi/en/02-None-00-01/test_0150.json. We can visualize the magnitudes of the update and reset gates using the result file. Note that you need jinja2 (Python package). Run the following command to host a web server for visualization and open it via browser:

python -m babi.visualize_result --task 2 --open True

then click the file(s). It takes a a few seconds to load the heatmap coloring of the gate values. You will see something like this:

visualization

By default visualize_result retrieves the first trial (1). If you want to retrieve a particular trial number, specify the trial number if --trial_num option.

3. 10k and Other Options

To train the model on 10k dataset, first preprocess the data with large flag:

python -m prepro --task 2 --large True

Then train the model with large flag as well:

python -m babi.main --noload --task 2 --large True --batch_size 128 --init_lr 0.1 --wd 0.0005 --hidden_size 200

Note that the batch size, init_lr, wd, and hidden_size changed.

Finally, visualization requires the large flag:

python -m babi.visualize_result --task 2 --open True --large True

To control other parameters and see other options, type:

python -m babi.main -h

4. Run bAbI dialog

To train the model on bAbI dialog, preprocess the data with bAbI dialog dataset:

python -m prepro-dialog --task 2

Then train the model:

python -m dialog.main --noload --task 2

To use match, use_match flag is required:

python -m dialog.main --noload --task 2 --use_match True

To use RNN decoder, use_rnn flag is required:

python -m dialog.main --noload --task 2 --use_rnn True
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].