The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
If you have already installed Torch7, please rename its folder name.
sh mv ~/torch ~/torch_bak
sh 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.
sh cd ~/torch ./install.sh
Follow the instructions (in http://torch.ch/docs/getting-started.html) to refresh your env variables. ```sh
source ~/.bashrc ```
sh luarocks install class pip install path.py
sh python pull_data.py
sh ./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
sh ./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
The code is only tested on the above environment.