Part Number: TDA4VM
Tool/software:
Hi,
I am trying to import a model containing a structure like this:
model = tf.keras.Sequential([ tf.keras.layers.Conv1D(filters=16, kernel_size=(7), padding='same', activation='tanh', input_shape=(24, 5)), tf.keras.layers.Conv1D(filters=16, kernel_size=(7), padding='same', activation='tanh'), tf.keras.layers.Flatten(), tf.keras.layers.Dense(2, activation='relu'), ])
When converting the model to tflite, the Conv1D layers get changed to Expand Dims + Conv2D + Reshape.
After importing with the tflite model importer (16bit), the runtime_visualization.svg shows that the reshape after the first convolution should be offloaded:

But looking into the first subgraph, the reshape is missing:

If I now put the tanh activation into the deny list, it still tries to create a separate subgraph for the first reshape, but since the reshape is never added, the import crashes with an empty subgraph:
VX_ZONE_ERROR:[tivxAddKernelTIDL:269] invalid values for num_input_tensors or num_output_tensors VX_ZONE_ERROR:[vxGetStatus:1020] Reference is NULL
Additionally I am confused, why in the last subgraph a DataConvert layer is added in between the tanh and the reshape operation:

Both input and output type of this DataConvert are the same.
I also noticed, when importing with the tidl_tools libraries from PROCESSOR-SDK-RTOS-J721E (09.02.00.05) I get the this message:
TIDL ALLOWLISTING LAYER CHECK -- [TIDL_TanhLayer] should be removed in import process. This activation type is not supported for >8bit input/output data type !!
But when using the tidl_tools libraries provided with edgeai-tidl-tools (09_02_07_00) I don't get the message. Are these libraries newer, than the ones compiled with the PSDK?
I am aware, that we should probably use Conv2D in our original model, to prevent the Expand Dims + Reshape layers, but still this crash should not happen.


