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)
| 325 | |
| 326 | |
| 327 | def 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 | |
| 340 | def get_params_from_init_net( |
no outgoing calls
no test coverage detected