forked from JULIELab/hellrich_coling2016
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrain.sh
executable file
·54 lines (44 loc) · 963 Bytes
/
train.sh
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
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
#SBATCH -p express
#SBATCH --cpus-per-task 4
WORKER=8
#read config
source $1
run=$2
size=$3
prefix=$4
if [ "$run" ] ; then
RUN=$run
else
RUN=1
fi
if [ "$size" ] ; then
SIZE=$size
fi
if [ "$prefix" ] ; then
PREFIX=$prefix
fi
corpus=$CORPUS$PREFIX/$SIZE
name="${SIZE}_run${run}$PREFIX"
target=$TARGET/${name}
mkdir -p $target logs
cat $1 > $TARGET/${name}/config
echo "run $RUN size $SIZE prefix $PREFIX" >> $TARGET/${name}/config
what=$(
what=""
cd $corpus
for x in ${WHAT//;/ }
do
what="$what $x"
done
echo $what
)
if [ "$INDEPENDENT" = true ]; then
for w in $what
do
python python/train_store_intermediate_resumable.py $target $corpus $WORKER $EPOCHS $MIN $HS $NEG $SAMPLE $CONVERGENCE $ALPHA $w &>> logs/$LOG$name
done
else
python python/train_store_intermediate_resumable.py $target $corpus $WORKER $EPOCHS $MIN $HS $NEG $SAMPLE $CONVERGENCE $ALPHA $what &> logs/$LOG$name
fi
echo $LOG$name >> completed-inter-resumable