.run_ce.sh 842 字节
Newer Older
1 2 3 4 5
#!/bin/bash

DATA_PATH=./dataset/wmt16

train(){
6 7
    python -u main.py \
        --do_train True \
8 9 10
        --src_vocab_fpath $DATA_PATH/en_10000.dict \
        --trg_vocab_fpath $DATA_PATH/de_10000.dict \
        --special_token '<s>' '<e>' '<unk>' \
11
        --training_file $DATA_PATH/wmt16/train \
12 13 14 15
        --use_token_batch True \
        --batch_size 2048 \
        --sort_type pool \
        --pool_size 10000 \
16 17 18
        --print_step 1 \
        --weight_sharing False \
        --epoch 20 \
19
        --enable_ce True \
20 21 22
        --random_seed 1000 \
        --save_checkpoint "" \
        --save_param ""
23 24 25 26 27 28 29 30 31 32
}

cudaid=${transformer:=0} # use 0-th card as default
export CUDA_VISIBLE_DEVICES=$cudaid

train | python _ce.py

cudaid=${transformer_m:=0,1,2,3} # use 0,1,2,3 card as default
export CUDA_VISIBLE_DEVICES=$cudaid

33
train | python _ce.py