Skip to content
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

Extract Network Weights #36

Open
bdlacree opened this issue Jun 7, 2017 · 2 comments
Open

Extract Network Weights #36

bdlacree opened this issue Jun 7, 2017 · 2 comments

Comments

@bdlacree
Copy link

bdlacree commented Jun 7, 2017

Hey---great work here. Sorry if this is obtuse, but is there a way to extract the neural network weight matrices after training?

Thanks!

@bmschmidt
Copy link
Owner

Word2vec learns two matrices--call them an embedding and a context vector (although this might not be appropriate for every method). The embedding matrix is the "model" that's returned by this package; it can be extracted by model <- train_word2vec(...) or read.vectors(...). The context vector is (I think) just thrown away after training, which is too bad because it can be useful in some situations.

Curious if you really want both or just the embedding matrix. I'd be willing to leave an issue open for the context vectors if there's a use for them.

@adamlauretig
Copy link

I'd certainly be interested in recovering the context vectors as well, if this is feasible. This package is pretty awesome, btw.

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

No branches or pull requests

3 participants