There are 4 different models in this repository. To train and evaluate them, it is neccessary to assign environment variables DATA_DIR, OUT_DIR and EMBEDDINGS for different file paths and specify config.py files. You then need to execute train.py and evaluate.py files. For all the models, DATA_DIR = data and EMBEDDINGS = embeddings.
For models 1 and 2:
- Training: softmax/scripts/train.py
- Evaluation: softmax/scripts/evaluate.py
- OUT_DIR = softmax/emb_tag_sum/output
- configuration: softmax/emb_tag_sum/config.py
- OUT_DIR = softmax/emb_cat_sum/output
- configuration: softmax/emb_cat_sum/config.py
For models 3 and 4:
- Training: seq2seq/scripts/train.py
- Evaluation: seq2seq/scripts/evaluate.py
- OUT_DIR = seq2seq/emb_tag_sum/output
- configuration: seq2seq/emb_tag_sum/config.py
- OUT_DIR = seq2seq/emb_cat_sum/output
- configuration: seq2seq/emb_cat_sum/config.py
Here's an example of a bash script for training and evaluating model 1:
#!/bin/bash
set -e
export DATA_DIR=data
export OUT_DIR=softmax/emb_tag_sum/output
export EMBEDDINGS_DIR=embeddings
python softmax/scripts/train.py --config softmax/emb_tag_sum/config.py
python softmax/scripts/evaluate.py --test --config softmax/emb_tag_sum/config.py