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 long
allocatorHandle
The pointer to the native memory allocator.protected boolean
closed
Is this value closed?protected TensorInfo
info
The size and shape information for this tensor.protected long
nativeHandle
The native pointer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkClosed()
Checks if the OnnxValue is closed, if so throwsIllegalStateException
.TensorInfo
getInfo()
Returns aTensorInfo
for this tensor.boolean
isClosed()
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 aTensorInfo
for this tensor.
-
isClosed
public boolean isClosed()
Description copied from interface:OnnxValue
Checks 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
.
-
-