Skip to main content

TensorFlow Lite app exports the functions "setup" and "loop" (So cute!) ... Let's add them to #BL602 Command-Line Interface

https://github.com/lupyuen/bl_iot_sdk/blob/tflite/customer_app/sdk_app_tflite/sdk_app_tflite/demo.c
Imagen/Foto
TensorFlow Lite Makefile looks complicated ... Let's download "gemmlowp" the simple way on #BL602

https://github.com/lupyuen/tflite-bl602/blob/main/bouffalo.mk#L52-L69
Imagen/Foto
Source Folders for TensorFlow Lite are defined in the #BL602 Makefiles "bouffalo.mk" and "component.mk"

https://github.com/lupyuen/tflite-bl602/blob/main/bouffalo.mk
Imagen/Foto
Our #BL602 Build of TensorFlow Lite calls "new" and "delete" to Allocate and Deallocate C++ Objects in Heap Memory ... But it's supposed to use Static Memory, not Heap Memory ... Let's find out why

https://github.com/lupyuen/bl_iot_sdk/tree/tflite/customer_app/sdk_app_tflite
Imagen/Foto
Setting this flag will tell TensorFlow Lite to use Static Memory (instead of Heap Memory) on #BL602 ... Neat!

https://github.com/lupyuen/tflite-bl602/blob/main/bouffalo.mk#L46-L49
Imagen/Foto
Just realised that "CPPFLAGS" works for building #BL602 C++ Libraries, but not for BL602 C++ Apps ... Dang

https://github.com/lupyuen/bl_iot_sdk/blob/tflite/customer_app/sdk_app_tflite/Makefile#L12-L20
Imagen/Foto
We disable Thread-Safe Initialisation by setting "-fno-threadsafe-statics" ... This fixes the Missing Functions "__cxa_guard_acquire" and "__cxa_guard_release" in #BL602 TensorFlow

https://github.com/lupyuen/bl_iot_sdk/blob/tflite/customer_app/sdk_app_tflite/sdk_app_tflite/bouffalo.mk#L37-L41
Imagen/Foto
We set the #BL602 Global Destructor "__dso_handle" to null ... Since we're not destroying the Static TensorFlow Variables

https://github.com/lupyuen/bl_iot_sdk/blob/tflite/customer_app/sdk_app_tflite/sdk_app_tflite/demo.c#L20-L22
Imagen/Foto
#TensorFlow Lite runs OK on #BL602 yay! 🎉 This pre-trained TensorFlow Model is supposed to infer "y = sin(x)" ... Let's verify the output! 🥧

https://github.com/lupyuen/bl_iot_sdk/tree/tflite/customer_app/sdk_app_tflite
Image/Photo
We have a #TensorFlow Lite Model that generates a Sine Wave ... Let's use it to light up the #BL602 LED ... In a fun and interesting way!

https://github.com/lupyuen/bl_iot_sdk/tree/tflite/customer_app/sdk_app_tflite
Image/Photo
Here's our Glowing LED on #PineCone #BL602 @ThePine64 ... Controlled by #TensorFlow Lite

https://youtube.com/shorts/EFpYJ3qsmEY?feature=share
Machine Learning with #TensorFlow Lite on #RISCV #BL602 ... All shall be explained in this article

https://lupyuen.github.io/articles/tflite?1
Imagen/Foto

olamundo reshared this.

Este sitio web utiliza cookies. Si continúa navegando por este sitio web, usted acepta el uso de las cookies.