Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JavaCPP Preset for ONNX and/or ONNX-Scala #42

Closed
EmergentOrder opened this issue Oct 28, 2018 · 4 comments
Closed

Use JavaCPP Preset for ONNX and/or ONNX-Scala #42

EmergentOrder opened this issue Oct 28, 2018 · 4 comments
Assignees

Comments

@EmergentOrder
Copy link
Contributor

The JavaCPP Preset for ONNX contains everything that you get from the implementation generated from the protobuf that is currently used. You also get the ability to "polish" and convert the version of a model (in this PR ) as well as access to the operator schemas, the ONNX IR, ONNX-ML (Classical Machine Learning extension), ONNXIFI and more.

The JavaCPP Preset offers an API that is as close as possible to the ONNX C++ API in Java.

In contrast, ONNX-Scala aims to provide a typeful, idiomatic and purely functional Scala API to ONNX. ONNX-Scala makes full use of (sometimes bleeding-edge) language features where appropriate, while targeting 2 current and 2 in-development versions of Scala for the JVM, as well as Scala Native and Scala.js.

ONNX-Scala provides a clean separation between API, program definition, and backend implementation.

I intend to add a Lantern-based backend there soon, but you could implement the provided API here.

They will be published separately, so there would be no circular dependency. i.e. : ONNX-Scala API <- Lantern <- ONNX-Scala Lantern Backend

@EmergentOrder
Copy link
Contributor Author

Thanks for the hard work on Lantern, by the way!

@feiwang3311 feiwang3311 self-assigned this Oct 31, 2018
@feiwang3311
Copy link
Owner

Thanks for the constructive suggestions and encouragement. We will investigate this as soon as we sort out more urgent matters in our group. :)

@EmergentOrder
Copy link
Contributor Author

@feiwang3311 @dan-zheng I've gone ahead and done the swap in favor of the JavaCPP Preset. The ONNX tests are passing.
It generally boils down to a drop-in replacement, with some renaming and type changes required. There is one set of helper methods that I wrote that add a bunch of code, but I will aim to refactor into a single, small method, and some other minor cleanup to do. I should have a PR for you in a few days.

@feiwang3311
Copy link
Owner

Thanks! I merged your PR. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants