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.