oramasearch / onnx-go

onnx-go gives the ability to import a pre-trained neural network within Go without being linked to a framework or library.
https://blog.owulveryck.info/2019/04/03/from-a-project-to-a-product-the-state-of-onnx-go.html
MIT License
704 stars 72 forks source link

Time taken to initialize model #216

Open VanshBil opened 5 months ago

VanshBil commented 5 months ago

backend := gorgonnx.NewGraph() model := onnx.NewModel(backend) err = model.UnmarshalBinary(binaryData)

This is the way to initialize model but to make multiple predictions do I need to do these steps every time or is there a way to skip the UnmarshalBinary step as my model is of big size and this takes more than 5ms and doing this for every prediction is not possible and if I don't do this the model gives increasing output for each input