Skip to content
PetalEdgeDocs

Devices

Generic TFLite package

The .pe package holds your TensorFlow Lite model, its labels and settings, and a Python inference script.

Try it in Studio
On this page

Goal

By the end of this page you will know how to build a Generic tf lite package and what is inside it.

Steps

  1. Train your model and check its results.
  2. Open Deployment in the left menu.
  3. Choose Generic tf lite as the device.
  4. Choose a precision. See Choosing Float32 or INT8.
  5. 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.
  6. Select Download Latest Build to save the .pe file.

What is inside a .pe package

A .pe file is one PetalEdge package file that contains:

PartWhat it is
model.tfliteYour trained model in TensorFlow Lite format, in the precision you chose
labels.txtThe names of your labels
manifest.jsonModel details: input shape, labels, model type and precision
dsp_config.jsonThe settings of your processing block
inference.pyA 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.

What next?