This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

tidlModelImport segfault on simple TFLite graph

Hi,

I am having troubles converting the following simple graph in TIDL, version j7_01_00_00_00:

import tensorflow as tf
import numpy as np

tfk = tf.keras
tfkl = tf.keras.layers

input = tfkl.Input([160, 160, 3])

M1 = np.random.randn(160, 160, 3).astype(np.float32)
M2 = np.random.randn(160, 160, 3).astype(np.float32)
C1 = np.random.randn(3, 3, 3, 1).astype(np.float32)
M3 = np.random.randn(160, 160, 3).astype(np.float32)


def layer(x):
    out1 = x * M1

    out2 = out1 * M2
    out2 = tf.nn.depthwise_conv2d(out2, filter=C1, strides=[1, 1, 1, 1], padding='SAME')

    out = out1 + out2
    out = M3 * out

    return out

out = tfkl.Lambda(layer)(input)
model = tfk.Model(inputs=input, outputs=out)
model.save('/tmp/model.hdf5')

converter = tf.lite.TFLiteConverter.from_keras_model_file('/tmp/model.hdf5')
tflite_model = converter.convert()
with open('/tmp/model.tflite', 'wb') as fp:
    fp.write(tflite_model)

The tidlModelImport tool is segfaulting. Here is the tidl_import.cfg file:
modelType = 3
inputNetFile = "/tmp/model.tflite"
inputParamsFile = "/tmp/model.tflite"
outputNetFile = tidl_net.bin
outputParamsFile = tidl_net.bin.param
executeNetworkCompiler = 0
inWidth = 160
inHeight = 160
inNumChannels = 3

The segfault happens in tidl_tfLiteImport.cpp, on line 126 data is NULL. Unfortunately the forum does not allow me to attach the TFLite model. Can you help me figure out what is going wrong?
Thanks!