This is a Seq2Seq model with Bahdanau Attention and Luong Attention.
Datasets:
dataset1: news-commentary-v14.de-en
Models:
model1: Bahdanau Attention & Luong Attention
PYTHONPATH=. python dataprocess/process.py- for loader
PYTHONPATH=. python loaders/loader1.py- for module
# Seq2Seq with Attention Bahdanau
PYTHONPATH=. python modules/module1.py --attention_type bahdanau
# Seq2Seq with Attention Luong and AlignMethod Dot
PYTHONPATH=. python modules/module1.py --attention_type luong --align_method dot
# Seq2Seq with Attention Luong and AlignMethod General
PYTHONPATH=. python modules/module1.py --attention_type luong --align_method general
# Seq2Seq with Attention Luong and AlignMethod Concat
PYTHONPATH=. python modules/module1.py --attention_type luong --align_method concatpython main.pyYou can change the config either in the command line or in the file utils/parser.py
Here are the examples:
python main.py --attention_type bahdanau
python main.py --attention_type luong --align_method dot
python main.py --attention_type luong --align_method general
python main.py --attention_type luong --align_method concat