Lossless shrink
losslessShrinks TensorFlow Lite or ONNX models for edge chips with bit-identical outputs and no retraining, then unpacks TensorFlow Lite Micro and C sources into the project.
Instructions
Make the model smaller in SRAM and flash with outputs bit-identical to the original: no data, no retraining. Usually under a minute. Waits for the result, downloads it, and unpacks the model for TensorFlow Lite Micro and its C sources into the project. Returns the before -> after figures and the files. If it is still running after about four minutes it returns the run id: then call wait_for_run and download.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model_path": "<model_path>",
"chip": "<chip>"
},
"name": "lossless"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chip | Yes | A chip name from list_chips. | |
| folder | No | Where to unpack the result. Default: <the model's folder>/sensorforge/<run id>/. | |
| overwrite | No | Replace files already in the folder. | |
| model_path | Yes | The model: .tflite or .onnx, or a .zip of a firmware export. |