public final class TensorInfo
- Object
- 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
nameString- runtime tensor name, possibly empty
typeTensorType- element type
shapeint[]- current tensor dimensions
indexint- 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