deeplearning4j-examples
deeplearning4j-examples copied to clipboard
Convert string to vector in DataVec
Please provide an example showing how to transform sentence (string) training data to vectors using a pre-populated word2vec object. Edourado mentioned we should be able to use an embedded layer to do this. Something about mapping word2vec to rows of vectors inside an embedded layer, then having the input layer contain indexes to those rows depending on what words the input data references.
Keep in mind the input contains sentences (multiple words). Thank you.
Have you tried the documentation. Or this example?
Yes. I've seen both. The first example shows how to build a word2vec which is useful but it doesn't show how to then use it in a neural network that does something with those words.
The second example shows taking word2vec trained on one set of data, and using it on a neural network training over a different set of data.
I am looking for an example that uses the same input data for both steps. Now, it's obvious in retrospect that you can use different input data for each step but it isn't obvious to new users. An all-in-all example would facilitate learning.