Hi everyone!
I am walking my first steps throught TFLM. I want to develop an tinyML applitcation to run on Cortex-M4 Nucleo-L4R5ZI board. I would like to write my code using Mbed Studio. So, I am working besed on the following resources:
- O'Reilly Tiny ML book. Particularly with sections...
- Chapter 13:TensorFlow Lite for Microcontrollers, Build Systems, pages 361-362
- Chapter 6: The "Hello World" of TinyML:Deploying to Microcontrollers, ST Microelectornics STM32F746G Discovery Kit, pages 124 to 126.
- Arm Mbed tutorial
The problem is that these resources and every tutorial show examples cloning from the old tensorflow lite github repository. Despite of @Advait Jain message on 19 may 2021, with subject "Update on the TFLM repository transition", where it says "The directory structure within the TFLM repository is identical to the TensorFlow repository so switching should only involve changing which GitHub repository you are cloning/forking." , my experience shows that this is not real. Let me explain below.
I am working on Windows 10, but following recomendation in O'Reilly TinyML book in page 361 where it says "What if you’re running on a Windows machine or want to use an IDE like Keil, Mbed, Arduino, or another specialized build system? That’s where the project generation comes in. You can generate a folder that’s ready to use with the Mbed IDE by running the following command line from Linux:", I have mounted an Ubuntu 18.04 LTS virtual machine with Virtual Box.
Here I detail the steps I have followed and why I am a bit confused.
- Download the TensorFlow Lite source code with: git clone https://github.com/tensorflow/tflite-micro.git
- First confusing point: Tutorials say that exists the following directoy: tensorflow/tensorflow/lite/micro/mbed/ but there is no mbed folder. Instead I find cortex_m_generic folder that I think it is what I need.
- Following the Readme file in
cortex_m_generic, I executed the make command for building TFLM library:
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic TARGET_ARCH=cortex-m4 OPTIMIZED_KERNEL_DIR=cmsis_nn microlite
- Second confusing point: O'Reilly TinyML says "You should now see a set of source files in tensorflow/lite/micro/tools/make/gen/disco_f746ng_x86_64/prj/micro_speech/mbed/, along with all the dependencies and project files you need to build within the Mbed environment." However, there is no prj folder in my case. Please check in the picture bellow. What I have is tensorflow/lite/micro/tools/make/gen/cortex_m_generic_cortex-m4_defaults
- core folder
- kernels folder
- third_party folder
So, how must I continue working?? Could anyone tell me how the workflow or pipeline goes on until get ready for writing applicaction code with Mbed Studio??
Thanks in advance and sorry if it a bit large the message, but I try to be as clear as possible.
I hope to get an early response.
Best Regards,
Martin