Skip to content

Commit

Permalink
Word2vec udpates
Browse files Browse the repository at this point in the history
  • Loading branch information
jcanny committed May 2, 2015
1 parent bc760d2 commit e11c69f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions scripts/testword2vec.ssc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import BIDMach.networks.Word2Vec

val mdir = "/code/word2vec/data/";

val (nn, opts) = Word2Vec.learner(mdir+"data%03d.imat.lz4");

opts.nstart = 0;
opts.nend = 7;
opts.npasses = 1;
opts.batchSize = 100000;
opts.lrate = 1e-3f;
opts.vexp = 0.5f
opts.nreuse = 5
opts.dim = 300
opts.vocabSize = 800000

//opts.useGPU = false;
//opts.autoReset = false;
//Mat.useMKL = false;

nn.train

val mod = nn.model.asInstanceOf[Word2Vec]

//saveFMat(mdir+"model0.fmat.lz4", FMat(mod.modelmats(0)))

//saveFMat(mdir+"model1.fmat.lz4", FMat(mod.modelmats(1)))

0 comments on commit e11c69f

Please sign in to comment.