MCPcopy Create free account
hub / github.com/pytorch/pytorch / _draw_nets

Function _draw_nets

caffe2/python/net_drawer.py:195–202  ·  view source on GitHub ↗
(nets, g)

Source from the content-addressed store, hash-verified

193
194
195def _draw_nets(nets, g):
196 nodes = []
197 for i, net in enumerate(nets):
198 nodes.append(pydot.Node(_escape_label(net)))
199 g.add_node(nodes[-1])
200 if i > 0:
201 g.add_edge(pydot.Edge(nodes[-2], nodes[-1]))
202 return nodes
203
204
205def _draw_steps(steps, g, skip_step_edges=False): # noqa

Callers 1

_draw_stepsFunction · 0.85

Calls 4

_escape_labelFunction · 0.85
add_edgeMethod · 0.80
appendMethod · 0.45
add_nodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…