ByteConversionUtils class
Utilities for converting between Dart objects and raw tensor byte buffers.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
bytesToFloat32(
Uint8List bytes) → double -
Converts float16
bytesto a float64 value via float32. -
convertBytesToObject(
Uint8List bytes, TensorType tensorType, List< int> shape) → Object -
Converts raw tensor bytes back to a Dart object with the given
shapeandtensorType. -
convertObjectToBytes(
Object o, TensorType tensorType) → Uint8List -
Converts a Dart object to its byte representation for the given
tensorType. -
decodeTFStrings(
Uint8List bytes) → List< String> -
Decodes a TensorFlow string tensor to a
List<String>. -
encodeTFStrings(
List< String> strings) → Uint8List - Encodes a list of Dart strings into the TFLite string tensor binary format.
-
floatToFloat16Bytes(
double value) → Uint8List -
Converts a float64
valueto its float16 byte representation.