Hi everyone,
For my university project I need a version of TensorFlow Lite Micro that is fully compatible with TensorFlow Lite 2.12.
From what I’ve seen, the Micro codebase has moved to a separate Git repository, and I can’t find the matching version there for 2.12.
Has anyone encountered this or knows how to get a TFLite Micro version that aligns exactly with TFLite 2.12?
Thanks in advance!
Hi, @user2274
Welcome to the community! I apologize for the delay in my response, TensorFlow Lite Micro was moved to its standalone repository (tensorflow/tflite-micro ) on June 25, 2021 , while TensorFlow 2.12.0 was released much later on March 23, 2023 . This means TF 2.12.0 does not contain TFLM code in its repository - it was already migrated by that time. [Ref]
Since there’s no official version mapping, you’ll need to find a compatible TFLM commit from around the TF 2.12.0 timeframe:
# Clone the standalone TFLM repository
git clone https://github.com/tensorflow/tflite-micro.git
cd tflite-micro
# Look for commits around TF 2.12.0 release (March 2023)
git log --oneline --since="2023-02-01" --until="2023-05-01"
# Choose a commit from March-April 2023 timeframe
git checkout <commit_hash_from_march_2023>
If strict version alignment is critical for your project, consider using an earlier TensorFlow version that still contained TFLM
# Use TensorFlow 2.11 or earlier (before June 2021 migration)
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
git checkout v2.11.0 # This will contain tensorflow/lite/micro/
Whichever approach you choose test the compatibility:
- Model Conversion: Ensure your models convert properly with TF 2.12.0
- API Compatibility: Verify the TFLM APIs match your code requirements
- Build System: Test that the TFLM code builds with your target platform
Let us know what approach works best for your setup and feel free to share any build issues you encounter!
Thank you for your cooperation and patience.