Getting Info regarding the fused activation function used from .tflite file

16 views
Skip to first unread message

Vishal Menon

unread,
Aug 31, 2021, 1:34:09 AMAug 31
to TensorFlow Lite
Hi,
Is it possible to get the information regarding the fused activation functions used from the .tflite file?
I know that netron.app could do the job of visualizing it, but I'm looking for some functions which could print the information.

Thanks in advance.
Vishal

Vishal Menon

unread,
Aug 31, 2021, 1:40:52 AMAug 31
to TensorFlow Lite, Vishal Menon
I specifically wanted to that, let's take an example, for a fully connected layer with relu as activation function, I would like to extract the info which states that relu is the activation function used here.

At first, I thought a string search around the tensor layer might do the trick, but that wouldn't work in all cases, esp when the last layer is an FCNN with relu as activation function(here, the tensor name would be changed to Identity)

netron_visualization.jpg
int8ops (12).tflite

Jaesung Chung

unread,
Aug 31, 2021, 6:23:07 PMAug 31
to Vishal Menon, TensorFlow Lite
The activation status is stored at the operator options like the below link in the flatbuffer file


You can retrieve it from the operator table like the below point:


--
You received this message because you are subscribed to the Google Groups "TensorFlow Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tflite+un...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tflite/02182b19-f933-4d4b-9adf-21aa1e016b48n%40tensorflow.org.
Reply all
Reply to author
Forward
0 new messages