Package ai.onnxruntime
Class OnnxTensorLike
- java.lang.Object
-
- ai.onnxruntime.OnnxTensorLike
-
- All Implemented Interfaces:
OnnxValue,java.lang.AutoCloseable
- Direct Known Subclasses:
OnnxSparseTensor,OnnxTensor
public abstract class OnnxTensorLike extends java.lang.Object implements OnnxValue
Currently implemented byOnnxTensor,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
Fields Modifier and Type Field Description protected longallocatorHandleThe pointer to the native memory allocator.protected booleanclosedIs this value closed?protected TensorInfoinfoThe size and shape information for this tensor.protected longnativeHandleThe native pointer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckClosed()Checks if the OnnxValue is closed, if so throwsIllegalStateException.TensorInfogetInfo()Returns aTensorInfofor this tensor.booleanisClosed()Checks if this value is closed (i.e., the native object has been released).
-
-
-
Field Detail
-
nativeHandle
protected final long nativeHandle
The native pointer.
-
allocatorHandle
protected final long allocatorHandle
The pointer to the native memory allocator.
-
info
protected final TensorInfo info
The size and shape information for this tensor.
-
closed
protected boolean closed
Is this value closed?
-
-
Method Detail
-
getInfo
public TensorInfo 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.
-
-