---+ A detailed Analysis of the hello_world_test.cc program Below the license header the program has a number of include directives giving access to the tflite micro library as well as a number of macros. <img alt="hello_world_test_include.png" height="252" src="%ATTACHURL%/hello_world_test_include.png" style="background-color: transparent;" title="hello_world_test_include.png" width="865" /> <verbatim>tensorflow/lite/core/c/common.h:</verbatim> defines the macro TF_LITE_ENSURE_STATUS as well as a number of data structures and it gives access to core functtionality of the tflite core library. <verbatim>tensorflow/lite/micro/examples/hello_world/models/hello_world_float_model_data.h and tensorflow/lite/micro/examples/hello_world/modules/hello_world_int8_model_data.h</verbatim> are the models created with train.py and converted to a C++ array. While the book describes how to create the .cc file using the Unix xxd command ,in which case the corresponding .h file must be created by hand, the new version uses the python script _generate_cc_arrays.py_ in<i> tensorflow/lite/micro/tools</i> to acconplish the conversion. You can easily try this with the command: <img alt="model_conversion.png" height="120" src="%ATTACHURL%/model_conversion.png" title="model_conversion.png" width="1102" /> The first parameter to the command is the name of the output directory and the second parameter is the filename of the model (should have the extension .tflite) The same python script can also be used to convert audio files (.wav), image files (.bmp) or excel sheets (.cvs). <verbatim>tensorflow/lite/micro/micro_interpreter.h</verbatim> The !Tensorflow Lite Micro interpreter, which will run the model <verbatim>tensorflow/lite/micro/micro_log.h</verbatim> Used for error logging. Defines _MicroPrintf_ used to print logging information -- %USERSIG{UliRaich - 2023-09-08}% ---++ Comments <br />%COMMENT%
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
hello_world_test_include.png
r1
manage
51.2 K
2023-09-08 - 08:28
UliRaich
png
model_conversion.png
r1
manage
39.6 K
2023-09-09 - 12:41
UliRaich
This topic: IoT_Course_English
>
WebHome
>
TinyML
>
CExamples
>
AnalysisCcTest
Topic revision: r3 - 2023-09-09 - UliRaich
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback