TensorBufferUint8 class

Represents data buffer with 8-bit unsigned integer values.

Inheritance

Constructors

TensorBufferUint8(List<int> shape)
Creates a TensorBufferUint8 with specified shape.
TensorBufferUint8.dynamic()

Properties

buffer ByteBuffer
Returns the data buffer.
no setterinherited
byteData ByteData
Where the data is stored
getter/setter pairinherited
endian Endian
finalinherited
flatSize int
Number of elements in the buffer. It will be changed to a proper value in the constructor.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isDynamic bool
Returns if the TensorBuffer is dynamic sized (could resize arbitrarily).
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape List<int>
Shape of the tensor
getter/setter pairinherited

Methods

getBuffer() ByteBuffer
Returns the data buffer.
inherited
getDataType() → TfLiteType
Returns the data type of this buffer.
override
getDoubleList() List<double>
Returns a List
override
getDoubleValue(int absIndex) double
Returns a double value at absIndex. If the buffer is of different types than double, the value will be converted into double. For example, when reading a value from TensorBufferUint8, the value will be first read out as uint8, and then will be converted from uint8 to double.
override
getFlatSize() int
Gets the TensorBuffer.flatSize of the buffer.
inherited
getIntList() List<int>
Returns an int array of the values stored in this buffer. If the buffer is of different type than int, the values will be converted into int, and loss of precision may apply. For example, getting an int array from a TensorBufferFloat with values {400.32, 23.04}, the output is {400, 23}.
override
getIntValue(int absIndex) int
Returns an int value at absIndex.
override
getShape() List<int>
Gets the current shape. (returning a copy here to avoid unexpected modification.)
inherited
getTypeSize() int
Returns the number of bytes of a single element in the list. For example, a float buffer will return 4, and a byte buffer will return 1.
override
loadBuffer(ByteBuffer buffer, {List<int>? shape}) → void
Loads a byte buffer into this TensorBuffer with specific shape.
inherited
loadList(List src, {required List<int> shape}) → void
Loads an List
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resize(List<int> shape) → void
For dynamic buffer, resize the memory if needed. For fixed-size buffer, check if the shape of src fits the buffer size.
inherited
toString() String
A string representation of this object.
inherited

Operators

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