Crates.io | tract-tflite |
lib.rs | tract-tflite |
version | 0.22.0 |
created_at | 2023-08-29 12:02:12.843275+00 |
updated_at | 2025-08-26 14:22:45.398435+00 |
description | Tiny, no-nonsense, self contained, TensorFlow and ONNX inference |
homepage | |
repository | https://github.com/snipsco/tract |
max_upload_size | |
id | 957976 |
size | 854,759 |
unimplemented, sausage is being made. If you want to help feel free to open a PR.
The generated code handles creating a model from a flatbuffer table. Right now the main task (as far as I understand) is to start adding the code to build a Tract Model from the ModelBuffer.
So the modelBuffer(the model read from a flatbuffer file) has a few components (with associated functions) worth looking at: operator_codes, subgraphs, and then buffers.
ENUM_VALUES_BUILTIN_OPERATOR: [BuiltinOperator; 162]
.Right now, I'm testing with a specific model under test data, so this might not generalize to other models. If you open the model in netron, you'll find 3 separate graphs: main, sequential/net/while_cond, and sequential/net/while_body.
In the main graph, node 10 is just listed as while, but it's actually composed of the other subgraphs.
I created a repository for the sole purpose of poking around with tflite models, if you would like to add a model for testing please put it inside test data, and add any test input to lfs. If you write some utility that would be useful for others contributers, feel free to add it. Otherwise just clone it and forget it, it's just trow-away code.