Title here
Summary here
import { parseTflite } from "@wetron/tflite";
const graph = parseTflite(bytes: Uint8Array): ModelGraphSynchronous - no await needed.
subgraphs[0]); secondary subgraphs referenced by If / While are not yet inlinedBuiltinOperator enum; custom ops use their custom_code stringModelGraph.weights.get(name) - tensors with a non-empty buffer referenceDetects both:
TFL3 at offset 4 (standard TFLite)ODLF at offset 4 (LiteRT / ODLF variant)| TFLite enum | dtype string |
|---|---|
| 0 | float32 |
| 1 | int32 |
| 2 | uint8 |
| 3 | int64 |
| 4 | string |
| 5 | bool |
| 6 | int16 |
| 7 | complex64 |
| 8 | int8 |
| 9 | float16 |
| 10 | float64 |
| 11 | complex128 |
| 16 | uint32 |
| 17 | uint64 |
| 256 | bfloat16 |
ModelGraph.weights; consumers call weights.get(name) for raw bytes and decodeWeight / computeStats from @wetron/core to inspect values. See
Weights.