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
720 stars 71 forks source link

run() function calls newMachine() everytime #198

Open manjunathsc24 opened 2 years ago

manjunathsc24 commented 2 years ago

Hi @owulveryck

in the below code of Run() , everytime it calls newmachine, is it required to be called everytime ? i guess its should work only when g.m is nil?

//if g.m == nil { g.m = xvm.NewMachine(g.exprgraph) defer g.m.Close() //g.m = gorgonia.NewTapeMachine(g.exprgraph) //}

thanks Manjunath

owulveryck commented 2 years ago

Hello,

It’s been a while since I touched this code. You seems to be right. If it works for you, can you submit a PR?

Thanks