Skip to main content

TensorFlow Lite

Take a Keras model that thrives on a data-centre GPU and make it answer in twenty milliseconds on a mid-range Android phone, offline, without draining the battery. That is the job TensorFlow Lite was built for, and the one this course teaches end to end.

Course duration: 4h​

What you will learn​

  • Read a device budget — memory, latency, energy — before choosing any optimisation.
  • Convert a SavedModel or a Keras model to the .tflite format, with signatures and metadata.
  • Apply post-training quantization (dynamic range, full integer, float16) and measure its cost.
  • Retrain with quantization-aware training when the accuracy drop is unacceptable.
  • Prune weights, cluster them and compress the file for network delivery.
  • Pick a hardware delegate — GPU, NNAPI, Core ML, XNNPACK — and handle the CPU fallback.
  • Integrate a .tflite model in an Android app and in an iOS app, without breaking preprocessing.
  • Measure latency percentiles and energy per inference on real phones.
  • Deliver a complete on-device image classifier and justify each trade-off.

Prerequisites​

  • Course 08, TensorFlow and Keras, especially SavedModel and preprocessing layers.
  • Course 10, convolutional networks, since the running example is a fine-tuned MobileNetV2.
  • Basic familiarity with Android or iOS toolchains helps, but is not required to follow the code.

The running example​

A single project runs through the ten modules: a plant leaf disease classifier based on a public dataset of diseased foliage, built on MobileNetV2 fine-tuned on that data, then embedded in a mobile app for farmers who mostly work with no reliable connectivity. Every module fills a new row in the running table of size, latency and accuracy — the trade-off matrix that turns "make it smaller" into a decision you can defend.

The library is now officially called LiteRT; we keep saying "TensorFlow Lite" because that is still the name every article, every StackOverflow answer and every Android sample uses, and the file extension remains .tflite.

Course modules​

  1. Constraints specific to on-device inference
  2. Converting to TensorFlow Lite
  3. Post-training quantization
  4. Quantization-aware training
  5. Pruning and size reduction
  6. Interpreter and hardware delegates
  7. Android integration
  8. iOS integration
  9. Measuring latency and power consumption
  10. Project: on-device image classification

Assessment and certificate​

The course ends with a 40-question exam covering every module. On success, a certificate of completion is issued immediately; its number can be verified by any third party on the platform.

Free courses, by contrast, end with a 5-question quiz and a certificate preview, without certification.