pytorch-tree-lstm icon indicating copy to clipboard operation
pytorch-tree-lstm copied to clipboard

Num edges = Num nodes - 1

Open SlimFrkh opened this issue 5 years ago • 0 comments

Every node in tree has one and only one parent, except for root node (that doesn't have a parent). This is means that E = N - 1 E: number of edges in tree N: number of nodes in tree

=> tree_size can be computed from shape[0] of adjacency matrix argument tree_size in calculate_evaluation_orders func can be removed as: tree_size = len(adjacency_list) + 1

SlimFrkh avatar Jan 03 '20 13:01 SlimFrkh