Skip to content

Commit

Permalink
wn-nouns hyperparameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mnick committed Mar 21, 2018
1 parent e926469 commit 9aecb86
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions train-nouns.sh
@@ -0,0 +1,28 @@
#!/bin/sh

# Get number of threads from environment or set to default
if [ -z "$NTHREADS" ]; then
NTHREADS=5
fi

echo "Using $NTHREADS threads"

# make sure OpenMP doesn't interfere with pytorch.multiprocessing
export OMP_NUM_THREADS=1

# The hyperparameter settings reproduce the mean rank results
# reported in [Nickel, Kiela, 2017]
# For MAP results, replace the learning rate parameter with -lr 2.0

python3 embed.py \
-dim 10 \
-lr 1.0 \
-epochs 1500 \
-negs 50 \
-burnin 20 \
-nproc "${NTHREADS}" \
-distfn poincare \
-dset wordnet/noun_closure.tsv \
-fout nouns.pth \
-batchsize 50 \
-eval_each 100 \

0 comments on commit 9aecb86

Please sign in to comment.