machinelearning
machinelearning copied to clipboard
Load ONNX from in-memory binary instead of file path
Is your feature request related to a problem? Please describe.
Currently, the only way to load ONNX model is to specify concrete file path. But the usage of concrete file path is often impossible in some platforms.(e.g. UWP without permission) Loading ONNX model from in-memory binary representation will solve this problem.
Describe the solution you'd like
Provide API to load ONNX model from ReadOnlyMemory<byte>, Stream.
Additional context
OnnxTransformer has private constructor which accepts byte[] modelBytes.
@luisquintanilla I'm going to say we shoudl take this for the next major release. SHouldn't be hard to do. We already have a private constructor that essentially does this and I've already looked into it a bit. If you think we should plan on next year though please bump the milestone out.
This makes sense to me.
This would be useful for a project I am working on.