0% found this document useful (0 votes)
5 views

Script

Uploaded by

nasoavina.m
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Script

Uploaded by

nasoavina.m
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

python3 preprocess.py --glove ./data/glove.840B.300d.

txt --batch_size 48 --dir


./data/nli_bias_aaai2020/ --output snli
python3 get_pretrain_vecs.py --glove ./data/glove.840B.300d.txt --dict
./data/nli_bias_aaai2020/snli.word.dict \
--output ./data/snli.glove

DATA_NAME=occupation_gender_templates.stitch
python3 preprocess_unlabeled.py --glove ./data/glove.840B.300d.txt --batch_size 48
--dir ./data/nli_bias_aaai2020/ \
--sent1 ${DATA_NAME}.sent1.txt --sent2 ${DATA_NAME}.sent2.txt \
--vocab ./data/nli_bias_aaai2020/snli.word.dict --vocab_all
./data/nli_bias_aaai2020/snli.allword.dict \
--output ${DATA_NAME}
python3 get_pretrain_vecs.py --glove ./data/glove.840B.300d.txt --dict
./data/nli_bias_aaai2020/${DATA_NAME}.word.dict \
--output ./data/${DATA_NAME}.glove

MODEL=./models/baseline
python3 -u train.py --gpuid 0 --dir data/nli_bias_aaai2020/ \
--train_data snli-train.hdf5 --val_data snli-val.hdf5 \
--word_vecs snli.glove.hdf5 --dict snli.word.dict \
--encoder rnn --use_elmo_post 0 \
--save_file $MODEL | tee $MODEL.log.txt

MODEL=./models/baseline
python3 -u eval.py --gpuid 0 --dir data/nli_bias_aaai2020/ \
--data snli-test.hdf5 \
--word_vecs snli.glove.hdf5 --dict snli.word.dict \
--encoder rnn --use_elmo_post 0 \
--load_file $MODEL

DATA_NAME=occupation_gender_templates.stitch
MODEL=./models/baseline
python3 -u predict_unlabeled.py --gpuid 0 --dir data/nli_bias_aaai2020/ \
--data ${DATA_NAME}.hdf5 --res ${DATA_NAME}.sent1.txt,${DATA_NAME}.sent2.txt,
${DATA_NAME}.x_pair.txt \
--word_vecs ${DATA_NAME}.glove.hdf5 --dict ${DATA_NAME}.word.dict \
--encoder rnn --use_elmo_post 0 \
--pred_output models/${DATA_NAME}.pred.txt \
--load_file $MODEL

You might also like