public final class TensorInfo

  1. Object
  2. TensorInfo
Immutable metadata for one model input or output. Shapes may contain a negative dynamic dimension until the input has been resized and tensors reallocated.

Constructors

public TensorInfo(String name, TensorType type, int[] shape, int index)Creates tensor metadata.

Methods

public String getName()
public TensorType getType()
public int[] getShape()
public int getIndex()

Inherited methods

Constructor details

TensorInfo

public TensorInfo(String name, TensorType type, int[] shape, int index)
Creates tensor metadata.

Parameters

name String
runtime tensor name, possibly empty
type TensorType
element type
shape int[]
current tensor dimensions
index int
native model index

Method details

getName

public String getName()

Returns

the runtime tensor name

getType

public TensorType getType()

Returns

the tensor element type

getShape

public int[] getShape()

Returns

a defensive copy of current dimensions

getIndex

public int getIndex()

Returns

the zero-based model input or output index