Interface | Description |
---|---|
OnnxValue |
Top interface for input and output values from ONNX models.
|
ValueInfo |
Interface for info objects describing an
OnnxValue . |
Class | Description |
---|---|
MapInfo |
Describes an
OnnxMap object or output node. |
NodeInfo |
The info for an input or output node from an ONNX model.
|
OnnxMap |
A container for a map returned by
OrtSession.run(Map) . |
OnnxModelMetadata |
Contains the metadata associated with an ONNX model.
|
OnnxSequence |
A sequence of
OnnxValue s all of the same type. |
OnnxTensor |
A Java object wrapping an OnnxTensor.
|
OrtEnvironment |
The host object for the onnx-runtime system.
|
OrtSession |
Wraps an ONNX model and allows inference calls.
|
OrtSession.Result | |
OrtSession.RunOptions |
Used to control logging and termination of a call to
OrtSession.run(java.util.Map<java.lang.String, ai.onnxruntime.OnnxTensor>) . |
OrtSession.SessionOptions |
Represents the options used to construct this session.
|
OrtUtil |
Util code for interacting with Java arrays.
|
SequenceInfo |
Describes an
OnnxSequence , including it's element type if known. |
TensorInfo |
Describes an
OnnxTensor , including it's size, shape and element type. |
Enum | Description |
---|---|
OnnxJavaType |
An enum representing onnxruntime supported Java primitive types (and String).
|
OnnxMap.OnnxMapValueType |
An enum representing the Java type of the values stored in an
OnnxMap . |
OnnxValue.OnnxValueType |
The type of the
OnnxValue , mirroring the id in the C API. |
OrtException.OrtErrorCode |
Maps the OrtErrorCode struct in "onnxruntime_c_api.h" with an additional entry for Java side
errors.
|
OrtLoggingLevel |
The logging level for messages from the environment and session.
|
OrtSession.SessionOptions.ExecutionMode |
The execution mode to use.
|
OrtSession.SessionOptions.OptLevel |
The optimisation level to use.
|
TensorInfo.OnnxTensorType |
The native element types supported by the ONNX runtime.
|
Exception | Description |
---|---|
OrtException |
An exception which contains the error message and code produced by the native onnxruntime.
|
Provides access to the same execution backends as the C library. Non-representable types in Java (such as fp16) are converted into the nearest Java primitive type when accessed through this API.
There are two shared libraries required: onnxruntime
and onnxruntime4j_jni
. The loader is in OnnxRuntime
and the logic is in this order:
onnxruntime.native.LIB_NAME.skip
with a value of true
. This means the
user has decided to load the library by some other means.
onnxruntime.native.LIB_NAME.path
. This uses System.load(java.lang.String)
.
System.load(java.lang.String)
via a temporary file. Ideally, this should be the default use
case when adding JAR's/dependencies containing the shared libraries to your
classpath.
System.loadLibrary(java.lang.String)
, which usually looks elsewhere on the filesystem
for the library. The semantics and behavior of that method are system/JVM dependent.
Typically, the java.library.path
property is used to specify the
location of native libraries.