TFLM currently support MicroPrintf
to log errors or messages to the terminal. This is a light-weight printf-lite utility available to log messages to the terminal. The MicroPrintf
calls are designed to be ignored or optimized-out by the compiler, during deployment, if TF_LITE_STRIP_ERROR_STRINGS
environment flag is set. This is useful to reduce the binary size of the TFLM application.
#include "tensorflow/lite/micro/micro_log.h"
"//tensorflow/lite/micro:micro_log",
size_t buffer_size = 1024; ... MicroPrintf("Failed to allocate buffer of size- %d", buffer_size); MicroPrintf("TFLM is the best! Bring ML to Embedded targets!");
TFLM does not support/recommend the use of TF_LITE_KERNEL_LOG
and TF_LITE_REPORT_ERROR
to log errors or messages to the terminal.