MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / get_labels

Function get_labels

nlp_class2/rntn_tensorflow.py:33–38  ·  view source on GitHub ↗
(tree)

Source from the content-addressed store, hash-verified

31
32
33def get_labels(tree):
34 # must be returned in the same order as tree logits are returned
35 # post-order traversal
36 if tree is None:
37 return []
38 return get_labels(tree.left) + get_labels(tree.right) + [tree.label]
39
40
41class RNTN:

Callers 2

fitMethod · 0.70
scoreMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected