tangjianpku/LINE

Return nan value in the final embedding output when test example txt file

Closed this issue · 0 comments

I was trying to test for the following txt file as input.
good the 3
the good 3
good bad 1
bad good 1
bad of 4
of bad 4

And here are the commands I use:
./reconstruct -train network.txt -output net_dense.txt -depth 2 -threshold 1000
./line -train net_dense.txt -output $a -binary 0 -size 128 -order 1 -negative 5 -samples 10000 -threads 40
./line -train net_dense.txt -output $b -binary 0 -size 128 -order 2 -negative 5 -samples 10000 -threads 40
./normalize -input $a -output $c -binary 0
./normalize -input $b -output $d -binary 0
./concatenate -input1 $c -input2 $d -output vec_all.txt -binary 0

In the vec_all.txt, the vectors for "bad" and "of" have many nans. Where did I do wrong? Thank you!