Tensor class

LiteRT tensor.

Constructors

Tensor(Pointer<TfLiteTensor> _tensor)
Creates a tensor wrapper around a native tensor pointer.

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

asFloat32View() → Float32List
Mutable Float32List view aliasing this tensor's native buffer.
copyTo(Object dst) → Object
Copies this tensor's data into dst.
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
Copies the given src data into this tensor.
toString() → String
A string representation of this object.
override

Operators

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