Skip to content

Commit 2baea22

Browse files
committed
Merge remote-tracking branch 'isi-nlp/master'
# Conflicts: # .gitignore # executable/ZOPH_RNN_XING # src/decoder_model_wrapper.h # src/decoder_model_wrapper.hpp # src/ensemble_factory.hpp
2 parents 3cd9a51 + 5c7d9a8 commit 2baea22

15 files changed

+7192
-7309
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
*[#]
66

77
*pyc
8+
.history
9+

README_XING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ All the following papers are based on this code:
1515
The source code is provided in `src/` directory. You can compile the code into a standalone executable by:
1616

1717
```
18-
bash script/compile.xing.sh
18+
bash scripts/compile.xing.sh
1919
```
2020

21-
The executable `ZOPH_RNN_XING` will appear in the root folder. An pre-compiled executable `ZOPH_RNN_XING` is in folder `executable\`.
21+
The executable `ZOPH_RNN_XING` will appear in the root folder. A pre-compiled executable `ZOPH_RNN_XING` is in folder `executable\`.
2222

2323
You should set the 7 environment variables and have the required libraries mentioned in `README.md` before compilation.
2424
Two additional requirements:

executable/ZOPH_RNN_XING

100644100755
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:7528806c908a31c36956112822036ee93322e4c8581e2b3218bb2f4cc76bb444
3-
size 126230008
2+
oid sha256:9331caaa8c6bf6ac7eb07a2d59e0706ad70f610ead632953de49015229cb0b57
3+
size 269

scripts/compile.xing.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ PATH_TO_CUDNN_V4_64=${PATH_TO_CUDNN_V4_64:-"/home/nlg-05/zoph/cudnn_v4/lib64/"}
2323
PATH_TO_EIGEN=${PATH_TO_EIGEN:-"/home/nlg-05/zoph/eigen/"}
2424
PATH_TO_CUDNN_INCLUDE=${PATH_TO_CUDNN_INCLUDE:-"/home/nlg-05/zoph/cudnn_v4/include/"}
2525

26-
#complie
26+
#compile
2727

2828
#-DTIMER_DEBUG
2929
nvcc -DCUDNN_STATIC -O3 -arch=sm_35 \

scripts/translate/f2e_decode.sh

100644100755
+5-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#PBS -q isi
33
#PBS -l walltime=1:00:00
44
#PBS -l gpus=2
55

6-
ROOT=../../ # change your ROOT to some absolute path
6+
SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
7+
ROOT=$SCRIPTDIR/../../
78

89
EXEC=$ROOT/executable/ZOPH_RNN_XING
910

@@ -33,7 +34,7 @@ FR_TRN=$data_folder/train_french.txt.tok.lc.10k
3334
# output
3435

3536
output_folder=$ROOT/scripts/translate/Fre_Eng_lc_d_att/decode
36-
mkdir $output_folder
37+
mkdir -p $output_folder
3738

3839
id=FE
3940
LOG=$output_folder/${id}.log
@@ -45,7 +46,7 @@ BLEU=$output_folder/${id}.bleu
4546

4647
cd $output_folder
4748

48-
$EXEC --decode-main-data-files $SRC_TST -b 12 -L 100 -k 1 $fe_nn_attention $OUTPUT > $LOG
49+
$EXEC --decode-main-data-files $SRC_TST -b 12 -L 100 -k 1 $fe_nn_attention $OUTPUT --logfile $LOG
4950

5051
# calculate BLEU
5152

scripts/translate/f2e_train.sh

100644100755
+11-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#PBS -q isi80
33
#PBS -l walltime=300:00:00
44
#PBS -l gpus=4
55

6-
ROOT=../../ # change your ROOT to some absolute path
6+
SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
7+
ROOT=$SCRIPTDIR/../../
78

89
EXEC=$ROOT/executable/ZOPH_RNN_XING
910

11+
echo "$EXEC -h";
12+
13+
$EXEC -h
14+
1015
# script
1116

1217
PY_FORMAT=$ROOT/scripts/bleu_format_valid.py
@@ -15,8 +20,9 @@ PERL_BLEU=$ROOT/scripts/multi-bleu.perl
1520
# model
1621

1722
model_dir=$ROOT/scripts/translate/Fre_Eng_lc_d_att/
18-
mkdir $model_dir
23+
mkdir -p $model_dir
1924
fe_nn_attention=$model_dir/best.nn
25+
model=$model_dir/model.nn
2026

2127
# data
2228

@@ -32,7 +38,7 @@ EN_TRN=$data_folder/train_english.txt.tok.lc.10k
3238
FR_TRN=$data_folder/train_french.txt.tok.lc.10k
3339

3440
# train
41+
LOG=$model_dir/train.log
3542

36-
cd $model_dir
3743

38-
$EXEC --logfile HPC_OUTPUT_NEW.txt -B best.nn --screen-print-rate 300 -N 2 -M 0 1 2 --attention-model true --feed-input true -H 1000 -a $FR_DEV $EN_DEV -t $FR_TRN $EN_TRN model.nn -v 200000 -V 40000 -L 100 -n 8 -A 1 --fixed-halve-lr 6 -l 0.35 -d 0.8 -m 128 -w 5
44+
$EXEC --logfile $LOG -B $fe_nn_attention --screen-print-rate 300 -N 2 -M 0 1 2 --attention-model true --feed-input true -H 1000 -a $FR_DEV $EN_DEV -t $FR_TRN $EN_TRN $model -v 200000 -V 40000 -L 100 -n 8 -A 1 --fixed-halve-lr 6 -l 0.35 -d 0.8 -m 128 -w 5

0 commit comments

Comments
 (0)