* * @param graph Graph the model or function graph to be executed. * @param parent When building function exector you need to set the parent * executor. Since the weights and function executor maps are set at parant * level, that function executor can access the function maps and weight
(private graph: Graph, private parent?: GraphExecutor)
| 132 | * through the parent. |
| 133 | */ |
| 134 | constructor(private graph: Graph, private parent?: GraphExecutor) { |
| 135 | this._outputs = graph.outputs; |
| 136 | this._inputs = graph.inputs; |
| 137 | this._initNodes = graph.initNodes; |
| 138 | this._signature = graph.signature; |
| 139 | this._functions = graph.functions; |
| 140 | // create sub-graph executors |
| 141 | if (graph.functions != null) { |
| 142 | Object.keys(graph.functions).forEach(name => { |
| 143 | this._functionExecutorMap[name] = |
| 144 | new GraphExecutor(graph.functions[name], this); |
| 145 | }); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | private getCompilationKey(inputs: Node[], outputs: Node[]): string { |
| 150 | const sortedInputs = inputs.map(node => node.name).sort(); |
nothing calls this directly
no outgoing calls
no test coverage detected