MCPcopy Create free account
hub / github.com/NVIDIA/DALI / add_split

Method add_split

dali/python/nvidia/dali/_conditionals.py:127–146  ·  view source on GitHub ↗

Register the outputs of split node that were produced from the source_data_node (or its descendant on this scope, the shortcut node). Parameters ---------- source_data_node : DataNode Original source node that was looked up, record for faster consecutive

(self, source_data_node, producer_node, true_node, false_node)

Source from the content-addressed store, hash-verified

125 )
126
127 def add_split(self, source_data_node, producer_node, true_node, false_node):
128 """Register the outputs of split node that were produced from the source_data_node
129 (or its descendant on this scope, the shortcut node).
130
131 Parameters
132 ----------
133 source_data_node : DataNode
134 Original source node that was looked up, record for faster consecutive lookups
135 producer_node : DataNode
136 The closest node on the path from source_data_node to this split
137 true_node : DataNode
138 True branch split
139 false_node : DataNode
140 False branch split
141 """
142 self.splits[_data_node_repr(source_data_node)] = (true_node, false_node)
143 # Record the direct preceding node as the producer:
144 self.splits[_data_node_repr(producer_node)] = (true_node, false_node)
145 self.produced_true |= {_data_node_repr(true_node)}
146 self.produced_false |= {_data_node_repr(false_node)}
147
148 def __str__(self):
149 return (

Callers 1

_realize_splitMethod · 0.80

Calls 1

_data_node_reprFunction · 0.85

Tested by

no test coverage detected