Erro running GloVe example

Hi,

I’m now trying the GloVeExample code using CPU on a linux box and using dl4j 1 beta 6. I have installed two different installations in my machine, one using CPU and another using GPU. This example I’m trying it in the installation for CPU.

I can compile/execute it or run it using the runexamples.sh script, but in both cases I get errors.

When compile it and execute it directly, I got the following error:

Exception in thread “main” java.lang.IllegalStateException: Multi-GPU word2vec/doc2vec isn’t available atm
at org.deeplearning4j.models.sequencevectors.SequenceVectors.fit(SequenceVectors.java:248)
at GloVeExample.main(GloVeExample.java:76)

line 76 includes the instruction: glove.fit();

When executed from the runexamples.sh, I got the following error:

o.d.m.s.SequenceVectors - Building learning algorithms:
o.d.m.s.SequenceVectors - building ElementsLearningAlgorithm: [GloVe]
o.d.m.e.l.i.e.GloVe - GloVe params: {Max Memory: [1], Learning rate: [0.1], Alpha: [0.75], xMax: [100.0], Symmetric: [true], Shuffle: [true]}
o.d.m.g.AbstractCoOccurrences - Actual memory limit: [1073741824]
o.d.m.g.AbstractCoOccurrences - Number of word pairs saved so far: [47194]
o.d.m.g.AbstractCoOccurrences - CoOccurrences map was built.
o.d.m.s.SequenceVectors - Starting learning process…
Exception in thread “VectorCalculationsThread 0” java.lang.RuntimeException: java.lang.UnsupportedOperationException
at org.deeplearning4j.models.sequencevectors.SequenceVectors$VectorCalculationsThread.run(SequenceVectors.java:1343)
Caused by: java.lang.UnsupportedOperationException
at org.deeplearning4j.models.embeddings.learning.impl.elements.GloVe.learnSequence(GloVe.java:136)
at org.deeplearning4j.models.sequencevectors.SequenceVectors.trainSequence(SequenceVectors.java:399)
at org.deeplearning4j.models.sequencevectors.SequenceVectors$VectorCalculationsThread.run(SequenceVectors.java:1274)

I appreciate if you could give me some hint on how to work this out.

Best,

Gabriel

Unfortunately there is a bug that results in this error, and not something you are doing wrong.

Edit:
After internal discussion we have decided to actually remove the GloVe functionality in the next release. It was broken for a long time now, and always had the problem that for a vocabulary of size N you need to create an NxN matrix. This quickly becomes unusable for many people as they either don’t have enough memory, or because it becomes too slow.

We support newer and better methods these days, so no one should be missing this feature.