New run
How to prepare data for Optimize
Images: a .zip of folders, one per class, holding JPEG or PNG files (person/, no_person/, ...).
To fix the test set yourself, put train/ and test/ folders in the zip, each with the class folders;
otherwise part of the data is held out for the test. Folder names in alphabetical order map to the model's outputs 0, 1, 2, ...
Audio, sensors and anything else: an .npz with X, the model's inputs exactly as your front end produces them
(float32, one row per sample, in the model's input shape), and y, each sample's class index in the model's output order.
Add X_test / y_test for a fixed test set. Without y, the original model's own answers become the
labels, so accuracy means agreement with your model.
import numpy as np
np.savez("data.npz", X=features.astype("float32"), y=labels.astype("int64"))
Streaming models (one time step per call, the state kept between calls, like a noise-suppression mask network):
X is the frames your front end produces, in time order, one per row ((N, 1, C) or (N, C)),
one recording after another; no y. sfopt groups them into sequences and holds the optimized model to your
model's outputs at every step.
Detectors, autoencoders, regression (the model outputs values, not class scores): set Output to values;
the optimized model is held to your model's own outputs, so y is not needed.
How much: a few hundred samples per class are enough to measure; more helps the retraining. The data is used for this run only and deleted when it ends.
Accuracy limit: how many points of accuracy the optimized model may lose against your file, measured on the test part.
Progress
Runs
| Model | Run | Status | Verdict | Started |
|---|
SRAM is the tensor arena TensorFlow Lite Micro allocates, measured by running the model under TensorFlow Lite Micro: built for a 32-bit RISC-V core (RV32GC, run under QEMU) where a result says so, otherwise a 64-bit build, whose figure is a little above a 32-bit chip's. Flash is the model file. Accuracy is the model run on the test part of your data. Nothing here is an estimate unless it says so.