Tensor class

TensorFlowLite tensor.

Constructors

Tensor(Pointer<TfLiteTensor> _tensor)

Properties

data Uint8List
Underlying data buffer as bytes.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
name String
Name of the tensor element.
no setter
params QuantizationParams
Quantization Params associated with the model, only Android
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape List<int>
Dimensions of the tensor.
no setter
type TensorType
Data type of the tensor element.
no setter

Methods

copyTo(Object dst) Object
getInputShapeIfDifferent(Object? input) List<int>?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numBytes() int
Returns the size, in bytes, of the tensor data.
numDimensions() int
Returns number of dimensions
numElements() int
Returns the number of elements in a flattened (1-D) view of the tensor.
setTo(Object src) → void
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

computeNumDimensions(Object? o) int
Returns the number of dimensions of a multi-dimensional array, otherwise 0.
computeNumElements(List<int> shape) int
Returns the number of elements in a flattened (1-D) view of the tensor's shape.
computeShapeOf(Object o) List<int>
Returns shape of an object as an int list
dataTypeOf(Object o) int
Returns data type of given object
fillShape(Object o, int dim, List<int>? shape) → void
Recursively populates the shape dimensions for a given (multi-dimensional) array)