Unity-Technologies / barracuda-release

Other
564 stars 76 forks source link

Linear Model support #293

Open dschwarz-tripp opened 2 years ago

dschwarz-tripp commented 2 years ago

Hi there, I'm wondering if there is a chance that Barracuda will support much simpler models converted from sklearn to ONNX, basically the operators from ai.onnx.ml. For example, I'd like to get import a simple logistic regression classifier into Unity, but LinearClassifier and Normalizer layers are not supported. It's a bit of a bummer since these should technically be even simpler than a NN. For example, attached here: logreg_iris.zip

I'm still not 100% sure why Barracuda has to provide support for compute layers already present in the ONNX runtime, is it for performance purposes? Looks like a lot of the ops are implemented as shaders which makes sense (sorry if the question is naive, still learning) With that said, to be able to accomplish this, should I be using straight up ONNX Runtime instead?. Alternatively, if I can be pointed in the right direction I'd be happy to contribute an implementation of these nodes on my own. I'm already combing through the source, any additional pointers will be greatly appreciated. Thanks!

andreobvio commented 1 year ago

Hello guys! I would love to have LinearClassifier working with barracuda.