# OnnxTensorLike (onnxruntime 1.15.0 API)

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 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

Fields
`protected long` `allocatorHandle`
`protected TensorInfo` `info`
`protected long` `nativeHandle`

### Method Summary

All Methods Instance Methods Concrete Methods
`TensorInfo` `getInfo()` Returns a `TensorInfo` for this tensor.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface ai.onnxruntime.OnnxValue

`close, getType, getValue`

### Field Detail

#### nativeHandle

    protected final long nativeHandle

#### allocatorHandle

    protected final long allocatorHandle

#### info

    protected final TensorInfo info

### Method Detail

#### getInfo

    public TensorInfo getInfo()

Returns a `TensorInfo` for this tensor.

Specified by:
  `getInfo` in interface `OnnxValue`
Returns:
  The tensor info.