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.

TDA4VM: Segmentation Error

Part Number: TDA4VM

Hi

I have a question about TIDL matrix operations.

I'd like to use a model that includes a simple matrix product operation (the product of matrix x of (1x32x32x128) and matrix y of (1x128) using tf.tordot), as shown in the following code

 

import numpy as np

import tensorflow as tf

height = 32

width = 32

channels = 128

inputs = {}

inputs['x'] = tf.random.uniform((1heightwidthchannels), dtype=tf.float32)

inputs['y'] = tf.random.uniform((1channels), dtype=tf.float32)

class MyModel(tf.keras.Model):

  def call(selfinputs):

      x = inputs['x']

      y = inputs['y']

      z = tf.tensordot(xy, [31])

      return z

model = MyModel()

z = model(inputs)

 

 

If I convert the above model to tflite, the structure of the model looks like the following: (Tf.tenSordot is converted to Reshape-FullyConnected-Reshape.)

If I try to convert it using tflrt_delegate.py, it will fail with a Segmentation Error as shown in the log on the right.

* the cause of the segmentation fault appears to be the result of fully connected only supporting 1x1x1xN size.

Do you have plans to support more fully connected inputs in the future?

* I think the simple matrix operations like the ones above are exactly what I want to do with MMA, but it doesn't

seem to be possible to have MMA calculate them (even with frameworks other than tflite) today. If there was a way

to do that could you please share the information it . (I don't care if I need some customize at TIDL implementation at my side.)

Also, I hope that in the future, these operations will be easily imported with tidl-importer, but are there any plans to do so?

(For example, in the TFLite model, if there is a Reshape-fully connected-Reshape structure, it would be a matrix operation, so let MMA do it.)

I'll share the tflite file with the code used to compile (tflrt_delegate_examprey.py) via BOX later.

Thanks and Best regards,

Tsurumoto.