-
Notifications
You must be signed in to change notification settings - Fork 747
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
ONNX not supported Mac OS X #638
Comments
No, we probably just need to adjust the build in the cppbuild.sh file: |
Sorry, I'm not too familiar with javacpp-presets or the maven build process (I mostly work in Python but need to make sure our model runs in Java). Are you saying to download the sh file and run it manually on my machine or something else? Thanks. |
Yes, that's basically it:
https://github.com/bytedeco/javacpp-presets#build-instructions
And we'll also need to add "macosx" next to "linux" in the
presets/onnx.java file, but that should be it.
|
Okay I added "macosx" to presets/onnx.java, but when went to install with maven I ran into |
I've included support for Mac in this PR: #622 |
Thanks I'm still having problems building on my Mac but I think this is due to problems with cmake on my end. I did get it running on Linux. I was wondering once I load the model what method do I call to actually make the predictions? Usually in Python I would do something like prepared_backend = onnx_caffe2.backend.prepare(model)
W = {model.graph.input[0].name: model_inputs.numpy()}
c2_out = prepared_backend.run(W)[0] Now I just have a ModelProto class but don't know what to do with it. |
* Add build for Mac OS X to presets for ONNX (issue #638)
I've merged the PR, so snapshots will be available sometime tomorrow. |
@EmergentOrder Any ideas about how we can do what @isaacmg mentions above? |
@isaacmg This preset does not include a backend. It enables us to do things like load a model, check it, optimize it, perform shape inference, convert it to a different ONNX version and gain access to the operator schemas and IR. The JavaCPP Preset offers an API that is as close as possible to the ONNX C++ API in Java. In contrast, my project ONNX-Scala aims to provide a typeful, idiomatic and purely functional Scala API to ONNX. ONNX-Scala provides a clean separation between API, program definition, and backend implementation. Currently there is no backend available for ONNX-Scala either, but the plan is to have several backend implementations available. The first cut of the first one should be ready in the near future. I am also working on a JavaCPP Preset for ngraph , which should provide us with an ONNX backend in Java (also a candidate for a backend in ONNX-Scala) |
Support for Mac has been included in version 1.4.4! Enjoy |
I'm trying to test out the ONNX preset on Mac and I'm getting the following error.
This is what my POM file looks like.
Am I missing anything?
The text was updated successfully, but these errors were encountered: