Skip to content

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

@cemrifki

Description

@cemrifki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions