MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / get_consumer_map

Function get_consumer_map

detectron2/export/shared.py:327–337  ·  view source on GitHub ↗

Return dict from versioned blob to list of (i, j), where i is index of consumer op, j is the index of input of that op.

(ssa)

Source from the content-addressed store, hash-verified

325
326
327def get_consumer_map(ssa):
328 """
329 Return dict from versioned blob to list of (i, j),
330 where i is index of consumer op, j is the index of input of that op.
331 """
332 consumer_map = collections.defaultdict(list)
333 for i in range(len(ssa)):
334 inputs = ssa[i][0]
335 for j, inp in enumerate(inputs):
336 consumer_map[inp].append((i, j))
337 return consumer_map
338
339
340def get_params_from_init_net(

Callers 3

_get_dependency_chainFunction · 0.85
_fuse_onceFunction · 0.85
remove_dead_end_opsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected