-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun_mule.sh
More file actions
44 lines (39 loc) · 901 Bytes
/
run_mule.sh
File metadata and controls
44 lines (39 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
export PYTHONUNBUFFERED="True"
SPLIT=$1
GPU_ID=$2
DATASET=$3
TAG=$4
case ${DATASET} in
multi30k)
LANGUAGES="en,de,fr,cs"
DOMAIN_ADAPT=1e-6
MAX_SENTENCE_LENGTH=40
;;
coco)
LANGUAGES="en,cn,jp"
DOMAIN_ADAPT=1e-5
MAX_SENTENCE_LENGTH=60
;;
*)
echo "No dataset given"
exit
;;
esac
if [ "${SPLIT}" = "train" ]; then
CUDA_VISIBLE_DEVICES=${GPU_ID} python train.py \
--max_sentence_length ${MAX_SENTENCE_LENGTH} \
--domain_adapt ${DOMAIN_ADAPT} \
--univ_pretrain \
--dataset ${DATASET} \
--split ${SPLIT} \
--save_dir models/${DATASET}/${TAG} \
--languages ${LANGUAGES}
else
CUDA_VISIBLE_DEVICES=${GPU_ID} python test.py \
--dataset ${DATASET} \
--split ${SPLIT} \
--save_dir models/${TAG} \
--languages ${LANGUAGES} \
--restore_path models/${DATASET}/${TAG}/two_branch-ckpt-$5.meta
fi