-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 \ |