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

How do I get the root embedding tensors after training the model? #101

Open
cemrifki opened this issue May 20, 2019 · 1 comment
Open

How do I get the root embedding tensors after training the model? #101

cemrifki opened this issue May 20, 2019 · 1 comment

Comments

@cemrifki
Copy link

cemrifki commented May 20, 2019

I perform sentiment analysis and I want to get the root embeddings of all trees after I train the whole training dataset of trees. I will use them all in a novel algorithm I've been developing.

What is the Python code for it? I want to obtain those root vectors (tensors) only, not the output scores for each sentiment label. I tried printing the names of all tensors through the following line of code:

[print(n.name) for n in tf.get_default_graph().as_graph_def().node]

However, I am not sure whether this code snippet prints the name of the root embedding tensor let alone exactly which one of them represents the root embedding.

@delesley
Copy link
Contributor

delesley commented May 20, 2019 via email

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

2 participants