mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-14 18:12:05 +00:00
* initial setup and rename "how to" to "setup" * move API to main nav * move api to main nav * add get starated, rework nav order * rename to install move mds out of install section * update api nav and home page * add install docs and python qs updates * python get started work * remove c and obj c for now * move java, python, and obj-c docs under api folder * move java api html to iframe (ugh) * remove api docs w/o details, move api text getstar * remove api docs wo detail updates get started * remvoe iframes * move eco system to main nav * fix api buttons * added more examples moved intro to ORT * fix links * fix get started titles * fix get started titles * fix more links * fix more links * more link fixes * fix nav remove inferencing and training subnav * fix top nav remove inference and training nav * fix title * fix tutorials nav hierarchy * fix python api button * add tenorflow keras example * fix quickstart toc * add imports fix spacing * fix links * update nav and python get started page * move ort training example, add coming soon for iot * update C# get started * fix spacing on quantization * Add some js get started content * fix formatting * fix typo * removed onnx-pytorch and onnx-tf * updated pip install torch and added links iot page * added pytorch tutorial heirarchy * updated web to docs soon added release blog link * add web link
1.5 KiB
1.5 KiB
| title | parent | grand_parent | has_children | nav_order |
|---|---|---|---|---|
| Model Execution | Deploy ONNX Runtime Mobile | Tutorials | false | 5 |
{::options toc_levels="2..4" /}
Executing an ORT format model
The API for executing ORT format models is the same as for ONNX models.
See the ONNX Runtime API documentation for details on individual API usage.
APIs by platform
| Platform | Available APIs |
|---|---|
| Android | C, C++, Java |
| iOS | C, C++, Objective-C (Swift via bridge) |
ORT format model loading
If you provide a filename for the ORT format model, a file extension of '.ort' will be inferred to be an ORT format model.
If you provide in-memory bytes for the ORT format model, a marker in those bytes will be checked to infer if it's an ORT format model.
If you wish to explicitly say that the InferenceSession input is an ORT format model you can do so via SessionOptions, although this generally should not be necessary.
C++ API
Ort::SessionOptions session_options;
session_options.AddConfigEntry('session.load_model_format', 'ORT');
Ort::Env env;
Ort::Session session(env, <path to model>, session_options);
Java API
SessionOptions session_options = new SessionOptions();
session_options.addConfigEntry("session.load_model_format", "ORT");
OrtEnvironment env = OrtEnvironment.getEnvironment();
OrtSession session = env.createSession(<path to model>, opsession_optionstions);