Devices
Generic TFLite package
The .pe package holds your TensorFlow Lite model, its labels and settings, and a Python inference script.
Try it in StudioGoal
By the end of this page you will know how to build a Generic tf lite package and what is inside it.
Steps
- Train your model and check its results.
- Open Deployment in the left menu.
- Choose Generic tf lite as the device.
- Choose a precision. See Choosing Float32 or INT8.
- Select Build Deployment Package (the button may read Build for followed by the device name). Studio shows the build in the list of recent builds.
- Select Download Latest Build to save the
.pefile.
What is inside a .pe package
A .pe file is one PetalEdge package file that contains:
| Part | What it is |
|---|---|
model.tflite | Your trained model in TensorFlow Lite format, in the precision you chose |
labels.txt | The names of your labels |
manifest.json | Model details: input shape, labels, model type and precision |
dsp_config.json | The settings of your processing block |
inference.py | A Python script that loads the model and runs it |
The inference script uses TensorFlow Lite, or its newer name LiteRT, to run the model.
Result
You have a .pe file with your model. PetalEdge's device software can unpack and run it.
Step-by-step instructions for running a .pe package on a particular device will be added once that workflow has been tested on hardware.