No description, website, or topics provided.
Lua Cuda Other
Switch branches/tags
Nothing to show
Clone or download
Latest commit d969e20 Apr 15, 2017
Permalink
Failed to load latest commit information.
install init Aug 7, 2016
seq2seq model.t7 Aug 13, 2016
seq2tree model.t7 Aug 13, 2016
.gitignore Initial commit Jun 14, 2016
LICENSE Initial commit Jun 14, 2016
README.md Update README.md Apr 15, 2017
pretrain.sh model.t7 Aug 13, 2016
pull_data.py git push using linux Aug 12, 2016
run.sh git push using linux Aug 12, 2016

README.md

Setup

  • If you have already installed Torch7, please rename its folder name.
mv ~/torch ~/torch_bak
  • Download Torch7
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
  • Replace ~/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu with the one in the ./install folder.

The original ClassNLLCriterion.cu throws an error when the input is 0. We modify this file to make it accept 0.

  • Install Torch7
cd ~/torch
./install.sh
# On Linux with bash
source ~/.bashrc
  • Install dependency
luarocks install class
pip install path.py
  • Pull data
python pull_data.py

Usage

  • Run pretrained models
./pretrain.sh [seq2seq|seq2tree] [jobqueries|geoqueries|atis] [lstm|attention] GPU_ID
# run seq2seq without attention
./pretrain.sh seq2seq jobqueries lstm
# print results
cat seq2seq/jobqueries/dump_lstm/pretrain.t7.sample
# run seq2seq with attention
./pretrain.sh seq2seq jobqueries attention
# print results
cat seq2seq/jobqueries/dump_attention/pretrain.t7.sample
  • Run experiments
./run.sh [seq2seq|seq2tree] [jobqueries|geoqueries|atis] [lstm|attention] GPU_ID
# run seq2seq without attention
./run.sh seq2seq jobqueries lstm
# print results
cat seq2seq/jobqueries/dump_lstm/model.t7.sample
# run seq2seq with attention
./run.sh seq2seq jobqueries attention
# print results
cat seq2seq/jobqueries/dump_attention/model.t7.sample

Environment

The code is only tested on the above environment.