-
Notifications
You must be signed in to change notification settings - Fork 6
/
train-nouns.sh
executable file
·44 lines (39 loc) · 858 Bytes
/
train-nouns.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
#!/bin/bash
# Script to reproduct results
DIMS="10"
MODEL="poincare"
while true; do
case "$1" in
-d | --dim ) DIMS=$2; shift; shift ;;
-m | --model ) MODEL=$2; shift; shift ;;
-- ) shift; break ;;
* ) break ;;
esac
done
USAGE="usage: ./train-nouns.sh -d <dim> -m <model>
-d: dimensions to use
-m: model to use (poincare)
Example: ./train-nouns.sh -m poincare -d 10
"
case "$MODEL" in
"poincare" ) EXTRA_ARGS=("-lr" "1.0");;
* ) echo "$USAGE"; exit 1;;
esac
# todo: -sparse
python3 embed.py \
-checkpoint checkpoints/nouns-10d.tf \
-dset wordnet/noun_closure.csv \
-epochs 1500 \
-negs 50 \
-burnin 20 \
-dampening 0.75 \
-eval_each 1 \
-fresh \
-sparse \
-burnin_multiplier 0.01 \
-neg_multiplier 0.1 \
-dampening 1.0 \
-batchsize 50 \
-manifold "$MODEL" \
-dim "$DIMS" \
"${EXTRA_ARGS[@]}"