Skip to content

Convert string to vector in DataVec #877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cowwoc opened this issue Aug 20, 2019 · 2 comments
Open

Convert string to vector in DataVec #877

cowwoc opened this issue Aug 20, 2019 · 2 comments

Comments

@cowwoc
Copy link

cowwoc commented Aug 20, 2019

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.

@RobAltena
Copy link
Contributor

Have you tried the documentation. Or this example?

@cowwoc
Copy link
Author

cowwoc commented Aug 22, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants