TFLite logging question, how to enable

Is there logging support for tensorflow lite, and if so how to you enable it?
I’ve found some information on logging for tensorflow, but applying those environment variables does not appear to enable any logging for tensorflow lite.

I’m trying to debug an issue running with TFLIte on an NXP ARM processor using lthe NXP NPU accelerator, and it would be useful to have some logging output from TFLite to get a better idea of what might be happening.

I’m able to turn on logging for the VX delegate that NXP provides, but need to get some more details from TFLite to see where the differences between CPU (works correctly) and NPU (bogus results) when processing YOLOv5 models.



Welcome to the Tensorflow Forum!

Are you looking for TFLite logger options?

For more details please refer to Tensorflow Lite iOS Interpreter production logs · Issue #58683 · tensorflow/tensorflow · GitHub.

Thank you!

Thanks, I probably wasn’t very clear on my question. I would like to be able to turn on logging from the command line. For example we are working with the NXP VX Delegate and there are several environment variables that we can specify when running either C++ based code or Python code and we can control the logging for the VX Delegate.

I found some environment variables for Tensorflow logging but that does not appear to turn on the logging for the TFLite library. Or does the library need to be specifically built to provide logging support?

We are running on Linux on the ARM platform…

Thanks again,

To reduce the binary size (very important on embedded and mobile) we strip a lot of logging messages from production binaries on Arm. If you compile in debug you will get much more verbose logs. You coudl also modify tensorflow/minimal_logging.h at c1583b21cd4f72e07246092005269cd47e925afd · tensorflow/tensorflow · GitHub to always enable logging if you must do an optimized build

1 Like

Thanks I spotted that after I had posted. So we’ll use a debug build instead. Right now the Yocto build doesn’t appear to build the TFLite debug flavor so we’re working on that.

Thanks again,