Error occurs when training spark word2vec

Hi,

I’m using org.deeplearning4j.spark.models.embeddings.word2vec.Word2Vec to train word2vec, and the following errors occur

Exception in thread “main” java.lang.IllegalStateException: Cannot perform in-place operation “addi”: result array shape does not match the broadcast operation output shape: [200].addi([1, 200]) != [200].
In-place operations like x.addi(y) can only be performed when x and y have the same shape, or x and y are broadcastable with x.shape() == broadcastShape(x,y)
at org.nd4j.linalg.api.shape.Shape.assertBroadcastable(Shape.java:283)
at org.nd4j.linalg.api.ndarray.BaseNDArray.addi(BaseNDArray.java:3251)
at org.nd4j.linalg.api.ndarray.BaseNDArray.addi(BaseNDArray.java:3245)
at org.deeplearning4j.spark.models.embeddings.word2vec.Word2Vec.train(Word2Vec.java:222)
at dl4jword2vec.Fun.main(Fun.java:24)

Here is my testing program http://codepad.org/0ZZvNFZI, and the POM.xml is here http://codepad.org/xDuX20l7. I’m not sure if I do anything wrong. The training file “/tmp/test” is just 100 lines of “a b c d e f g h I j k”.

Thank you all in advance.

That appears to be a bug. Not many people are still using Word2Vec, and fewer still are using it on Spark.

Please report this bug on github: https://github.com/eclipse/deeplearning4j/issues

Thank you! Will report it.