MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / trace

Method trace

tensorflow/python/debug/lib/debug_graphs.py:180–214  ·  view source on GitHub ↗

Trace inputs. Args: graph_element_name: Name of the node or an output tensor of the node, as a str. Raises: GraphTracingReachedDestination: if destination_node_name of this tracer object is not None and the specified node is reached.

(self, graph_element_name)

Source from the content-addressed store, hash-verified

178 self._destination_node_name = destination_node_name
179
180 def trace(self, graph_element_name):
181 """Trace inputs.
182
183 Args:
184 graph_element_name: Name of the node or an output tensor of the node, as a
185 str.
186
187 Raises:
188 GraphTracingReachedDestination: if destination_node_name of this tracer
189 object is not None and the specified node is reached.
190 """
191 self._depth_count += 1
192
193 node_name = get_node_name(graph_element_name)
194 if node_name == self._destination_node_name:
195 raise GraphTracingReachedDestination()
196
197 if node_name in self._skip_node_names:
198 return
199 if node_name in self._visited_nodes:
200 return
201
202 self._visited_nodes.append(node_name)
203
204 for input_list in self._input_lists:
205 if node_name not in input_list:
206 continue
207 for inp in input_list[node_name]:
208 if get_node_name(inp) in self._visited_nodes:
209 continue
210 self._inputs.append(inp)
211 self._depth_list.append(self._depth_count)
212 self.trace(inp)
213
214 self._depth_count -= 1
215
216 def inputs(self):
217 return self._inputs

Callers 10

transitive_inputsMethod · 0.95
find_some_pathMethod · 0.95
compute_ac_spectrumFunction · 0.45
_process_input_helperMethod · 0.45
_compute_non_batch_klFunction · 0.45
_compute_non_batch_klFunction · 0.45
_get_weightsMethod · 0.45
compareMethod · 0.45
FromProtoMethod · 0.45

Calls 3

get_node_nameFunction · 0.85
appendMethod · 0.45

Tested by 3

_compute_non_batch_klFunction · 0.36
_compute_non_batch_klFunction · 0.36
compareMethod · 0.36