(root, yid, root_t)
| 242 | """ |
| 243 | |
| 244 | def recursive(root, yid, root_t): |
| 245 | if root: |
| 246 | # srcop: operator for a input of root |
| 247 | # yid: id(output of this operator) |
| 248 | # y: output of this operator |
| 249 | for srcop, yid, y, _ in root.src: |
| 250 | recursive(srcop, yid, y) |
| 251 | |
| 252 | if type(root).__name__ == 'Dummy': |
| 253 | if root_t != None: |
| 254 | # constant within a node: weight |
| 255 | weights[root.name] = root_t |
| 256 | else: |
| 257 | # constant outside a node: input |
| 258 | inputs[root.name] = root_t |
| 259 | else: |
| 260 | nodes[root.name] = root |
| 261 | |
| 262 | nodes = OrderedDict() |
| 263 | weights = OrderedDict() |
no test coverage detected