smile icon indicating copy to clipboard operation
smile copied to clipboard

ONNX support.

Open MuhammedSaleem-Brej opened this issue 1 year ago • 3 comments

I hope to add ONNX format support to this excellent framework. ONNX is an open-source and a standard format of AI models. With ONNX we will be able to share our models between frameworks and programing languages.

MuhammedSaleem-Brej avatar Aug 02 '24 17:08 MuhammedSaleem-Brej

You are more than welcome to contribute to this project! I believe that there is already a Java binding for ONNX. Can you please share what you would like to develop? Thanks!

haifengl avatar Aug 04 '24 20:08 haifengl

Firstly, thank you very much for your generosity And secondly I aim to make Smile framework able to import and export ONNX models using smile.io package. The next virtual code may explain the idea. import java.nio.file.Path; import smile.classification.RandomForest; import smile.io.Read; import smile.io.Write; // Import an ONNX model. RandomForest model = (RandomForest) Read.onnx("/home/model.onnx"); // Export an ONNX model. Write.onnx(model, Path.of("/home/model.onnx"));

MuhammedSaleem-Brej avatar Aug 05 '24 16:08 MuhammedSaleem-Brej

Cool. Feel free to create PR when you get it work. Thanks in advance!

haifengl avatar Aug 06 '24 04:08 haifengl