microsoft / onnxjs

ONNX.js: run ONNX models using JavaScript
Other
1.76k stars 129 forks source link

src: allow operators to access graph in initialization #227

Closed fs-eire closed 3 years ago

fs-eire commented 4 years ago

By accessing the graph ( already resolved and finalized ) in operator's initialization, it is possible to access the tensor value of the operator's input, if it's the graph's initializer or const value. This will enable implementation of upcoming operators that want to deal with constant inputs.