gorokoba560 / norm-analysis-of-transformer

74 stars 12 forks source link

Typo in train.sh #2

Closed javiferran closed 3 years ago

javiferran commented 3 years ago

Hi, amazing work! and really appreciate you sharing the code.

I was checking it and there is a typo in norm-analysis-of-transformer/exp2_nmt/train.sh, in --trainpref $DATS_DIR/train.bpe it should be $DATA_DIR

#!/bin/sh

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

DATA_DIR=./work/processed_data
BPE_DIR=./work/bpe_model_and_vocab

# convert BPE vocab to use for fairseq
cut -f1 $BPE_DIR/de.vocab | tail -n +4 | sed "s/$/ 100/g" > $DATA_DIR/de.vocab
cut -f1 $BPE_DIR/en.vocab | tail -n +4 | sed "s/$/ 100/g" > $DATA_DIR/en.vocab

# fairseq preprocess
fairseq-preprocess --source-lang de --target-lang en \
    --trainpref $DATS_DIR/train.bpe \
    --validpref $DATA_DIR/valid.bpe \
    --testpref $DATA_DIR/valid.bpe \
    --srcdict $DATA_DIR/de.vocab \
    --tgtdict $DATA_DIR/en.vocab \
    --destdir $DATA_DIR/fairseq_preprocessed_data \
    --workers 16 # adjust here to suit your environment
gorokoba560 commented 3 years ago

Hi, I appreciate your letting me know that typo! I have corrected it. Thank you!