Skip navigation links
A C D E F G I K L M N O R S T V 

A

addCPU(boolean) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Adds the CPU as an execution backend, using the arena allocator if desired.
addCUDA() - Method in class ai.onnxruntime.OrtSession.SessionOptions
Add CUDA as an execution backend, using device 0.
addCUDA(int) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Add CUDA as an execution backend, using the specified CUDA device id.
addDnnl(boolean) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Adds Intel's Deep Neural Network Library as an execution backend.
addNGraph(String) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Adds NGraph as an execution backend.
addNnapi() - Method in class ai.onnxruntime.OrtSession.SessionOptions
Adds Android's NNAPI as an execution backend.
addNuphar(boolean, String) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Adds Nuphar as an execution backend.
addOpenVINO(String) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Adds OpenVINO as an execution backend.
addTensorrt(int) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Adds Nvidia's TensorRT as an execution backend.
ai.onnxruntime - package ai.onnxruntime
A Java interface to the onnxruntime.

C

clazz - Variable in enum ai.onnxruntime.OnnxJavaType
 
close() - Method in class ai.onnxruntime.OnnxMap
Closes this map, releasing the native memory backing it and it's elements.
close() - Method in class ai.onnxruntime.OnnxSequence
Closes this sequence, releasing the native memory backing it and it's elements.
close() - Method in class ai.onnxruntime.OnnxTensor
Closes the tensor, releasing it's underlying memory (if it's not backed by an NIO buffer).
close() - Method in interface ai.onnxruntime.OnnxValue
Closes the OnnxValue, freeing it's native memory.
close(Iterable<? extends OnnxValue>) - Static method in interface ai.onnxruntime.OnnxValue
Calls close on each element of the iterable.
close(Map<String, ? extends OnnxValue>) - Static method in interface ai.onnxruntime.OnnxValue
Calls close on each OnnxValue in the map.
close() - Method in class ai.onnxruntime.OrtEnvironment
Closes the OrtEnvironment.
close() - Method in class ai.onnxruntime.OrtSession
Closes the session, releasing it's resources.
close() - Method in class ai.onnxruntime.OrtSession.Result
 
close() - Method in class ai.onnxruntime.OrtSession.SessionOptions
Closes the session options, releasing any memory acquired.
constructFromBuffer(Buffer, long[], OnnxJavaType) - Static method in class ai.onnxruntime.TensorInfo
Constructs a TensorInfo from the supplied byte buffer.
constructFromJavaArray(Object) - Static method in class ai.onnxruntime.TensorInfo
Constructs a TensorInfo from the supplied multidimensional Java array, used to allocate the appropriate amount of native memory.
createSession(String) - Method in class ai.onnxruntime.OrtEnvironment
Create a session using the default OrtSession.SessionOptions, model and the default memory allocator.
createSession(String, OrtSession.SessionOptions) - Method in class ai.onnxruntime.OrtEnvironment
Create a session using the specified OrtSession.SessionOptions, model and the default memory allocator.
createSession(byte[], OrtSession.SessionOptions) - Method in class ai.onnxruntime.OrtEnvironment
Create a session using the specified OrtSession.SessionOptions, model and the default memory allocator.
createSession(byte[]) - Method in class ai.onnxruntime.OrtEnvironment
Create a session using the default OrtSession.SessionOptions, model and the default memory allocator.
createTensor(OrtEnvironment, Object) - Static method in class ai.onnxruntime.OnnxTensor
Create a Tensor from a Java primitive or String multidimensional array.
createTensor(OrtEnvironment, String[], long[]) - Static method in class ai.onnxruntime.OnnxTensor
Create a tensor from a flattened string array.
createTensor(OrtEnvironment, FloatBuffer, long[]) - Static method in class ai.onnxruntime.OnnxTensor
Create an OnnxTensor backed by a direct FloatBuffer.
createTensor(OrtEnvironment, DoubleBuffer, long[]) - Static method in class ai.onnxruntime.OnnxTensor
Create an OnnxTensor backed by a direct DoubleBuffer.
createTensor(OrtEnvironment, ByteBuffer, long[]) - Static method in class ai.onnxruntime.OnnxTensor
Create an OnnxTensor backed by a direct ByteBuffer.
createTensor(OrtEnvironment, ByteBuffer, long[], OnnxJavaType) - Static method in class ai.onnxruntime.OnnxTensor
Create an OnnxTensor backed by a direct ByteBuffer.
createTensor(OrtEnvironment, ShortBuffer, long[]) - Static method in class ai.onnxruntime.OnnxTensor
Create an OnnxTensor backed by a direct ShortBuffer.
createTensor(OrtEnvironment, IntBuffer, long[]) - Static method in class ai.onnxruntime.OnnxTensor
Create an OnnxTensor backed by a direct IntBuffer.
createTensor(OrtEnvironment, LongBuffer, long[]) - Static method in class ai.onnxruntime.OnnxTensor
Create an OnnxTensor backed by a direct LongBuffer.

D

DEFAULT_NAME - Static variable in class ai.onnxruntime.OrtEnvironment
 

E

elementCount(long[]) - Static method in class ai.onnxruntime.OrtUtil
Counts the number of elements stored in a Tensor of this shape.

F

flattenString(Object) - Static method in class ai.onnxruntime.OrtUtil
Flatten a multidimensional String array into a single dimensional String array, reading it in a multidimensional row-major order.

G

get(int) - Method in class ai.onnxruntime.OrtSession.Result
Gets the value from the container at the specified index.
get(String) - Method in class ai.onnxruntime.OrtSession.Result
Gets the value from the container assuming it's not been closed.
getByteBuffer() - Method in class ai.onnxruntime.OnnxTensor
Returns a copy of the underlying OnnxTensor as a ByteBuffer.
getCode() - Method in exception ai.onnxruntime.OrtException
Return the error code.
getDoubleBuffer() - Method in class ai.onnxruntime.OnnxTensor
Returns a copy of the underlying OnnxTensor as a DoubleBuffer if the underlying type is a double, otherwise it returns null.
getEnvironment() - Static method in class ai.onnxruntime.OrtEnvironment
Gets the OrtEnvironment.
getEnvironment(String) - Static method in class ai.onnxruntime.OrtEnvironment
Gets the OrtEnvironment.
getEnvironment(OrtEnvironment.LoggingLevel) - Static method in class ai.onnxruntime.OrtEnvironment
Gets the OrtEnvironment.
getEnvironment(OrtEnvironment.LoggingLevel, String) - Static method in class ai.onnxruntime.OrtEnvironment
Gets the OrtEnvironment.
getFloatBuffer() - Method in class ai.onnxruntime.OnnxTensor
Returns a copy of the underlying OnnxTensor as a FloatBuffer if it can be losslessly converted into a float (i.e.
getID() - Method in enum ai.onnxruntime.OrtSession.SessionOptions.ExecutionMode
Gets the int id used in native code for the execution mode.
getID() - Method in enum ai.onnxruntime.OrtSession.SessionOptions.OptLevel
Gets the int id used in native code for this optimisation level.
getInfo() - Method in class ai.onnxruntime.NodeInfo
The type and shape information of this node.
getInfo() - Method in class ai.onnxruntime.OnnxMap
 
getInfo() - Method in class ai.onnxruntime.OnnxSequence
 
getInfo() - Method in class ai.onnxruntime.OnnxTensor
 
getInfo() - Method in interface ai.onnxruntime.OnnxValue
Gets the type info object associated with this OnnxValue.
getInputInfo() - Method in class ai.onnxruntime.OrtSession
Returns the info objects for the inputs, including their names and types.
getInputNames() - Method in class ai.onnxruntime.OrtSession
Returns the input names.
getIntBuffer() - Method in class ai.onnxruntime.OnnxTensor
Returns a copy of the underlying OnnxTensor as an IntBuffer if the underlying type is int32 or uint32, otherwise it returns null.
getLongBuffer() - Method in class ai.onnxruntime.OnnxTensor
Returns a copy of the underlying OnnxTensor as a LongBuffer if the underlying type is int64 or uint64, otherwise it returns null.
getName() - Method in class ai.onnxruntime.NodeInfo
The name of the node.
getNumInputs() - Method in class ai.onnxruntime.OrtSession
Returns the number of inputs this model expects.
getNumOutputs() - Method in class ai.onnxruntime.OrtSession
Returns the number of outputs this model expects.
getOutputInfo() - Method in class ai.onnxruntime.OrtSession
Returns the info objects for the outputs, including their names and types.
getOutputNames() - Method in class ai.onnxruntime.OrtSession
Returns the output names.
getShape() - Method in class ai.onnxruntime.TensorInfo
Get a copy of the tensor's shape.
getShortBuffer() - Method in class ai.onnxruntime.OnnxTensor
Returns a copy of the underlying OnnxTensor as a ShortBuffer if the underlying type is int16 or uint16, otherwise it returns null.
getType() - Method in class ai.onnxruntime.OnnxMap
 
getType() - Method in class ai.onnxruntime.OnnxSequence
 
getType() - Method in class ai.onnxruntime.OnnxTensor
 
getType() - Method in interface ai.onnxruntime.OnnxValue
Gets the type of this OnnxValue.
getValue() - Method in class ai.onnxruntime.OnnxMap
Returns a weakly typed Map containing all the elements.
getValue() - Method in class ai.onnxruntime.OnnxSequence
Extracts a Java object from the native ONNX type.
getValue() - Method in class ai.onnxruntime.OnnxTensor
Either returns a boxed primitive if the Tensor is a scalar, or a multidimensional array of primitives if it has multiple dimensions.
getValue() - Method in interface ai.onnxruntime.OnnxValue
Returns the value as a Java object copying it out of the native heap.
getValue() - Method in enum ai.onnxruntime.OrtEnvironment.LoggingLevel
 

I

isClosed() - Method in class ai.onnxruntime.OrtEnvironment
Is this environment closed?
isScalar() - Method in class ai.onnxruntime.TensorInfo
Returns true if the shape represents a scalar value (i.e.
isSequenceOfMaps() - Method in class ai.onnxruntime.SequenceInfo
Is this a sequence of maps?
iterator() - Method in class ai.onnxruntime.OrtSession.Result
 

K

keyType - Variable in class ai.onnxruntime.MapInfo
The Java type of the keys.

L

length - Variable in class ai.onnxruntime.SequenceInfo
The number of elements in this sequence.

M

makeCarrier() - Method in class ai.onnxruntime.TensorInfo
Constructs an array the right shape and type to hold this tensor.
mapFromClass(Class<?>) - Static method in enum ai.onnxruntime.OnnxJavaType
Maps from a Java class object into the enum type, returning OnnxJavaType.UNKNOWN for unsupported types.
mapFromInt(int) - Static method in enum ai.onnxruntime.OnnxJavaType
Maps from an int in native land into an OnnxJavaType instance.
mapFromInt(int) - Static method in enum ai.onnxruntime.OnnxMap.OnnxMapValueType
Gets the enum type from it's integer id.
mapFromInt(int) - Static method in enum ai.onnxruntime.OrtException.OrtErrorCode
Maps from an int in native land into an OrtErrorCode instance.
mapFromInt(int) - Static method in enum ai.onnxruntime.TensorInfo.OnnxTensorType
Maps from the C API's int enum to the Java enum.
mapFromJavaType(OnnxJavaType) - Static method in enum ai.onnxruntime.TensorInfo.OnnxTensorType
Maps a OnnxJavaType into the appropriate native element type.
mapFromOnnxJavaType(OnnxJavaType) - Static method in enum ai.onnxruntime.OnnxMap.OnnxMapValueType
Maps a OnnxJavaType into a map value type.
mapFromOnnxTensorType(TensorInfo.OnnxTensorType) - Static method in enum ai.onnxruntime.OnnxJavaType
Maps from the TensorInfo.OnnxTensorType enum to the corresponding OnnxJavaType enum, converting types as appropriate.
MapInfo - Class in ai.onnxruntime
Describes an OnnxMap object or output node.
mapInfo - Variable in class ai.onnxruntime.SequenceInfo
The type of the map if it contains a map, null otherwise.
MAX_DIMENSIONS - Static variable in class ai.onnxruntime.TensorInfo
Maximum number of dimensions supported by the Java interface methods.

N

newBooleanArray(long[]) - Static method in class ai.onnxruntime.OrtUtil
Creates a new primitive boolean array of up to 8 dimensions, using the supplied shape.
newByteArray(long[]) - Static method in class ai.onnxruntime.OrtUtil
Creates a new primitive byte array of up to 8 dimensions, using the supplied shape.
newDoubleArray(long[]) - Static method in class ai.onnxruntime.OrtUtil
Creates a new primitive double array of up to 8 dimensions, using the supplied shape.
newFloatArray(long[]) - Static method in class ai.onnxruntime.OrtUtil
Creates a new primitive float array of up to 8 dimensions, using the supplied shape.
newIntArray(long[]) - Static method in class ai.onnxruntime.OrtUtil
Creates a new primitive int array of up to 8 dimensions, using the supplied shape.
newLongArray(long[]) - Static method in class ai.onnxruntime.OrtUtil
Creates a new primitive long array of up to 8 dimensions, using the supplied shape.
newShortArray(long[]) - Static method in class ai.onnxruntime.OrtUtil
Creates a new primitive short array of up to 8 dimensions, using the supplied shape.
NodeInfo - Class in ai.onnxruntime
The info for an input or output node from an ONNX model.
NodeInfo(String, ValueInfo) - Constructor for class ai.onnxruntime.NodeInfo
Creates a node info object from the supplied name and value info.

O

OnnxJavaType - Enum in ai.onnxruntime
An enum representing onnxruntime supported Java primitive types (and String).
OnnxMap - Class in ai.onnxruntime
A container for a map returned by OrtSession.run(Map).
OnnxMap.OnnxMapValueType - Enum in ai.onnxruntime
An enum representing the Java type of the values stored in an OnnxMap.
OnnxSequence - Class in ai.onnxruntime
A sequence of OnnxValues all of the same type.
OnnxTensor - Class in ai.onnxruntime
A Java object wrapping an OnnxTensor.
onnxType - Variable in class ai.onnxruntime.TensorInfo
The native type of this tensor.
OnnxValue - Interface in ai.onnxruntime
Top interface for input and output values from ONNX models.
OnnxValue.OnnxValueType - Enum in ai.onnxruntime
The type of the OnnxValue, mirroring the id in the C API.
OrtEnvironment - Class in ai.onnxruntime
The host object for the onnx-runtime system.
OrtEnvironment.LoggingLevel - Enum in ai.onnxruntime
The logging level for messages from the environment and session.
OrtException - Exception in ai.onnxruntime
An exception which contains the error message and code produced by the native onnxruntime.
OrtException(String) - Constructor for exception ai.onnxruntime.OrtException
Creates an OrtException with a default Java error code and the specified message.
OrtException(int, String) - Constructor for exception ai.onnxruntime.OrtException
Used to throw an exception from native code as it handles the enum lookup in Java.
OrtException(OrtException.OrtErrorCode, String) - Constructor for exception ai.onnxruntime.OrtException
Creates an OrtException using the specified error code and message.
OrtException.OrtErrorCode - Enum in ai.onnxruntime
Maps the OrtErrorCode struct in "onnxruntime_c_api.h" with an additional entry for Java side errors.
OrtSession - Class in ai.onnxruntime
Wraps an ONNX model and allows inference calls.
OrtSession.Result - Class in ai.onnxruntime
An AutoCloseable wrapper around a Map containing OnnxValues.
OrtSession.SessionOptions - Class in ai.onnxruntime
Represents the options used to construct this session.
OrtSession.SessionOptions.ExecutionMode - Enum in ai.onnxruntime
The execution mode to use.
OrtSession.SessionOptions.OptLevel - Enum in ai.onnxruntime
The optimisation level to use.
OrtUtil - Class in ai.onnxruntime
Util code for interacting with Java arrays.

R

reshape(boolean[], long[]) - Static method in class ai.onnxruntime.OrtUtil
Reshapes a boolean array into the desired n-dimensional array assuming the boolean array is stored in n-dimensional row-major order.
reshape(byte[], long[]) - Static method in class ai.onnxruntime.OrtUtil
Reshapes a byte array into the desired n-dimensional array assuming the byte array is stored in n-dimensional row-major order.
reshape(short[], long[]) - Static method in class ai.onnxruntime.OrtUtil
Reshapes a short array into the desired n-dimensional array assuming the short array is stored in n-dimensional row-major order.
reshape(int[], long[]) - Static method in class ai.onnxruntime.OrtUtil
Reshapes an int array into the desired n-dimensional array, assuming the int array is stored in n-dimensional row-major order.
reshape(long[], long[]) - Static method in class ai.onnxruntime.OrtUtil
Reshapes a long array into the desired n-dimensional array, assuming the long array is stored in n-dimensional row-major order.
reshape(float[], long[]) - Static method in class ai.onnxruntime.OrtUtil
Reshapes a float array into the desired n-dimensional array assuming the float array is stored in n-dimensional row-major order.
reshape(double[], long[]) - Static method in class ai.onnxruntime.OrtUtil
Reshapes a double array into the desired n-dimensional array assuming the double array is stored in n-dimensional row-major order.
run(Map<String, OnnxTensor>) - Method in class ai.onnxruntime.OrtSession
Scores an input feed dict, returning the map of all inferred outputs.
run(Map<String, OnnxTensor>, Set<String>) - Method in class ai.onnxruntime.OrtSession
Scores an input feed dict, returning the map of requested inferred outputs.

S

SequenceInfo - Class in ai.onnxruntime
Describes an OnnxSequence, including it's element type if known.
sequenceOfMaps - Variable in class ai.onnxruntime.SequenceInfo
Is this a sequence of maps.
sequenceType - Variable in class ai.onnxruntime.SequenceInfo
The type of the sequence if it does not contain a map, OnnxJavaType.UNKNOWN if it does.
SessionOptions() - Constructor for class ai.onnxruntime.OrtSession.SessionOptions
Create an empty session options.
setExecutionMode(OrtSession.SessionOptions.ExecutionMode) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Sets the execution mode of this options object, overriding the old setting.
setInterOpNumThreads(int) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Sets the size of the CPU thread pool used for executing multiple request concurrently, if executing on a CPU.
setIntraOpNumThreads(int) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Sets the size of the CPU thread pool used for executing a single graph, if executing on a CPU.
setOptimizationLevel(OrtSession.SessionOptions.OptLevel) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Sets the optimization level of this options object, overriding the old setting.
setOptimizedModelFilePath(String) - Method in class ai.onnxruntime.OrtSession.SessionOptions
Sets the output path for the optimized model.
setTelemetry(boolean) - Method in class ai.onnxruntime.OrtEnvironment
Turns on or off the telemetry.
size - Variable in class ai.onnxruntime.MapInfo
The number of entries in this map.
size - Variable in enum ai.onnxruntime.OnnxJavaType
 
size() - Method in class ai.onnxruntime.OnnxMap
The number of entries in the map.
size() - Method in class ai.onnxruntime.OrtSession.Result
Returns the number of outputs in this Result.

T

TensorInfo - Class in ai.onnxruntime
Describes an OnnxTensor, including it's size, shape and element type.
TensorInfo.OnnxTensorType - Enum in ai.onnxruntime
The native element types supported by the ONNX runtime.
toString() - Method in class ai.onnxruntime.MapInfo
 
toString() - Method in class ai.onnxruntime.NodeInfo
 
toString() - Method in class ai.onnxruntime.OnnxMap
 
toString() - Method in class ai.onnxruntime.OnnxSequence
 
toString() - Method in class ai.onnxruntime.OnnxTensor
 
toString() - Method in class ai.onnxruntime.OrtEnvironment
 
toString() - Method in class ai.onnxruntime.OrtSession
 
toString() - Method in class ai.onnxruntime.SequenceInfo
 
toString() - Method in class ai.onnxruntime.TensorInfo
 
transformShape(long[]) - Static method in class ai.onnxruntime.OrtUtil
Converts an long shape into a int shape.
transformShape(int[]) - Static method in class ai.onnxruntime.OrtUtil
Converts an int shape into a long shape.
type - Variable in class ai.onnxruntime.TensorInfo
The Java type of this tensor.

V

validateShape(long[]) - Static method in class ai.onnxruntime.OrtUtil
Checks that the shape is a valid shape for a Java array (i.e.
value - Variable in enum ai.onnxruntime.OnnxJavaType
 
value - Variable in enum ai.onnxruntime.OnnxValue.OnnxValueType
The id number of this type in the C API.
value - Variable in enum ai.onnxruntime.TensorInfo.OnnxTensorType
The int id on the native side.
ValueInfo - Interface in ai.onnxruntime
Interface for info objects describing an OnnxValue.
valueOf(String) - Static method in enum ai.onnxruntime.OnnxJavaType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum ai.onnxruntime.OnnxMap.OnnxMapValueType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum ai.onnxruntime.OnnxValue.OnnxValueType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum ai.onnxruntime.OrtEnvironment.LoggingLevel
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum ai.onnxruntime.OrtException.OrtErrorCode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum ai.onnxruntime.OrtSession.SessionOptions.ExecutionMode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum ai.onnxruntime.OrtSession.SessionOptions.OptLevel
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum ai.onnxruntime.TensorInfo.OnnxTensorType
Returns the enum constant of this type with the specified name.
values() - Static method in enum ai.onnxruntime.OnnxJavaType
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum ai.onnxruntime.OnnxMap.OnnxMapValueType
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum ai.onnxruntime.OnnxValue.OnnxValueType
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum ai.onnxruntime.OrtEnvironment.LoggingLevel
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum ai.onnxruntime.OrtException.OrtErrorCode
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum ai.onnxruntime.OrtSession.SessionOptions.ExecutionMode
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum ai.onnxruntime.OrtSession.SessionOptions.OptLevel
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum ai.onnxruntime.TensorInfo.OnnxTensorType
Returns an array containing the constants of this enum type, in the order they are declared.
valueType - Variable in class ai.onnxruntime.MapInfo
The Java type of the values.
A C D E F G I K L M N O R S T V 
Skip navigation links