Package ai.onnxruntime
Class OnnxTensorLike
java.lang.Object
ai.onnxruntime.OnnxTensorLike
- All Implemented Interfaces:
OnnxValue,AutoCloseable
- Direct Known Subclasses:
OnnxSparseTensor,OnnxTensor
Currently implemented by
OnnxTensor, OnnxSparseTensor. Will be sealed to these
types one day.-
Nested Class Summary
Nested classes/interfaces inherited from interface ai.onnxruntime.OnnxValue
OnnxValue.OnnxValueType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longThe pointer to the native memory allocator.protected booleanIs this value closed?protected final TensorInfoThe size and shape information for this tensor.protected final longThe native pointer. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidChecks if the OnnxValue is closed, if so throwsIllegalStateException.getInfo()Returns aTensorInfofor this tensor.booleanisClosed()Checks if this value is closed (i.e., the native object has been released).
-
Field Details
-
nativeHandle
protected final long nativeHandleThe native pointer. -
allocatorHandle
protected final long allocatorHandleThe pointer to the native memory allocator. -
info
The size and shape information for this tensor. -
closed
protected boolean closedIs this value closed?
-
-
Method Details
-
getInfo
Returns aTensorInfofor this tensor. -
isClosed
public boolean isClosed()Description copied from interface:OnnxValueChecks if this value is closed (i.e., the native object has been released). -
checkClosed
protected void checkClosed()Checks if the OnnxValue is closed, if so throwsIllegalStateException.
-