Pc-liao / Transformer_agg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transformer_agg

data and checkpoint could be download: https://drive.google.com/open?id=1SlZ9PFlEIizh5r5vcmCLzkaZI34p9P3T

truncate and use bpe(optional)

1.move scripts/truncate_data.py to your dataset dir and modify the truncate length then run

python truncate_data.py

2.modify data dir as the location of your data in prepro.py then run

python prepro.py

preprocessing(or download data from data

You also need modify $raw_data_dir and $data_dir in script preprocess.sh

chmod u+x preprocess.sh # optional, if you dont have permission
bash preprocess.sh

training

modify $data_dir and $model_saved_dir in train_sum_attn.sh

chmod u+x train_sum_attn.sh # optional, if you dont have permission
bash train_sum_attn.sh

generating

modify $data_dir and $result in generate_cnn.sh

chmod u+x generate_cnn.sh # optional, if you dont have permission
bash generate_cnn.sh

Reference:

fairseq: https://github.com/pytorch/fairseq

About


Languages

Language:Python 98.5%Language:Lua 0.7%Language:C++ 0.6%Language:Shell 0.2%