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.

AM5729: Import MobileNetV2 with TIDL import tool fails with Pad Layer is not supported by TIDL

Part Number: AM5729

I am trying to import a MobileNetV2 with the TIDL import tool

The model is created with the following python code:

import tensorflow as tf
test_model = tf.keras.applications.MobileNetV2()
saved_model_dir="keras_mobilenet"
tf.keras.models.save_model(test_model,"./"+saved_model_dir)


# Convert the model
converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir) # path to the SavedModel directory
tflite_model = converter.convert()

# Save the model.
with open('model_06_28.tflite', 'wb') as f:
  f.write(tflite_model)

And I try to import it with the following configuration file:

modelType = 3
numParamBits = 12
quantizationStyle = 1
inputNetFile = "/home/pierrickrauby/models/models_06_28/model_06_28.tflite"
outputNetFile = "/home/pierrickrauby/models/models_06_28/model_06_28.bin"
outputParamsFile = "/home/pierrickrauby/models/models_06_28/model_06_28_"
inDataNorm = 1
inMean = 128 128 128
inScale = 0.0078125 0.0078125 0.0078125
resizeWidth = 256
resizeHeight = 256
inWidth = 224
inHeight = 224
inNumChannels = 3
sampleInData = ../../test/test.png
postProcType = 1
tidlStatsTool = "/home/pierrickrauby/ti-processor-sdk-linux-am57xx-evm-06.03.00.106/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/eve_test_dl_algo_ref.out"

Note that I successfully import the MobileNetV2 model from provided on this page(software-dl.ti.com/.../md_tidl_models_info.html ) with the same configuration file.

The import fails with the following error message :

Pad Layer is not supported by TIDL

But the PAD layer is supposed to be supported(https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/06_02_00_21/exports/docs/tidl_j7_01_01_00_10/ti_dl/docs/user_guide_html/md_tidl_layers_info.html) , does any one knows how to solve that ?

  • Hi,

    Sorry for the delay.

    This model can't be imported as the "Pad Layer is not supported by TIDL" in the AM57xx, please refer to user guide of AM57xx for supported layers. 

     >> But the PAD layer is supposed to be supported(https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/06_02_00_21/exports/docs/tidl_j7_01_01_00_10/ti_dl/docs/user_guide_html/md_tidl_layers_info.html) , does any one knows how to solve that ?

    This link is referring to J7/TDA4 datasheet and this is not the AM57xx, so don't refer to this for AM57xx.

    Thanks,

    Praveen

  • Hi Praveen, 

    Sorry, I think I have attached the wrong link; this link is the correct one, I believe, and it also mentions that the PAD layer is supported. 
    Can you explain tell me what I am doing wrong? 


    Note that I can import MobiletNetV2 from the software-dl.ti website, and it works, but the problem appears when I want to import MobileNetV2 from a TF lite model as presented in the code snippet in my original post. I believe that those 2 models, even if coming from different sources, should have the same layers. 

    Best 

    Pierrick 

  • Hi Pierrick,

    Kindly share the import tool output log to check this error.

    Thanks,

    Praveen

  • Hi Praveen, 

    He is the output of the import tool, sorry for the late answer. 

    Thanks 

    Pierrick

     

    =============================== TIDL import - parsing ===============================
    
    TFLite Model (Flatbuf) File  : /home/pierrickrauby/models/models_06_28/model_06_28.tflite  
    TIDL Network File      : /home/pierrickrauby/models/models_06_28/model_06_28.bin  
    TIDL IO Info File      : /home/pierrickrauby/models/models_06_28/model_06_28_  
    TFLite node size: 69
    TIDL limitation: Currently PAD layer is supported if the following layer is convolution with stride > 1.
    
     Import error: Pad layer cannot be merged into other layers.
    
    Num of Layer Detected :  71 
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Num|TIDL Layer Name               |Out Data Name                                     |Group |#Ins  |#Outs |Inbuf Ids                       |Outbuf Id |In NCHW                             |Out NCHW                            |MACS       |
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        0|TIDL_DataLayer                |serving_default_input_2:0                         |     0|    -1|     1|  x   x   x   x   x   x   x   x |  0       |       0        0        0        0 |       1        3      224      224 |         0 |
        1|TIDL_ConvolutionLayer         |FusedBatchNormV3;mobilenetv2_1.00_224/Conv1/Conv2D|     1|     1|     1|  0   x   x   x   x   x   x   x |  1       |       1        3      224      224 |       1       32      112      112 |  10838016 |
        2|TIDL_ConvolutionLayer         |thwise/depthwise;mobilenetv2_1.00_224/Conv1/Conv2D|     1|     1|     1|  1   x   x   x   x   x   x   x |  2       |       1       32      112      112 |       1       32      112      112 |   3612672 |
        3|TIDL_ConvolutionLayer         |mobilenetv2_1.00_224/expanded_conv_project/Conv2D1|     1|     1|     1|  2   x   x   x   x   x   x   x |  3       |       1       32      112      112 |       1       16      112      112 |   6422528 |
        4|TIDL_ConvolutionLayer         |hNormV3;mobilenetv2_1.00_224/block_1_expand/Conv2D|     1|     1|     1|  3   x   x   x   x   x   x   x |  4       |       1       16      112      112 |       1       96      112      112 |  19267584 |
        5|TIDL_PadLayer                 |mobilenetv2_1.00_224/block_1_pad/Pad              |     1|     1|     1|  4   x   x   x   x   x   x   x |  5       |       1       96      112      112 |       1       97      113      112 |         0 |
        6|TIDL_ConvolutionLayer         |D;mobilenetv2_1.00_224/block_1_depthwise/depthwise|     1|     1|     1|  5   x   x   x   x   x   x   x |  6       |       1       97      113      112 |       1       96       56       55 |   2688840 |
        7|TIDL_ConvolutionLayer         |ormV3;mobilenetv2_1.00_224/block_1_project/Conv2D1|     1|     1|     1|  6   x   x   x   x   x   x   x |  7       |       1       96       56       55 |       1       24       56       55 |   7096320 |
        8|TIDL_ConvolutionLayer         |hNormV3;mobilenetv2_1.00_224/block_2_expand/Conv2D|     1|     1|     1|  7   x   x   x   x   x   x   x |  8       |       1       24       56       55 |       1      144       56       55 |  10644480 |
        9|TIDL_ConvolutionLayer         |D;mobilenetv2_1.00_224/block_2_depthwise/depthwise|     1|     1|     1|  8   x   x   x   x   x   x   x |  9       |       1      144       56       55 |       1      144       56       55 |   3991680 |
       10|TIDL_ConvolutionLayer         |onv2D;mobilenetv2_1.00_224/block_2_project/Conv2D1|     1|     1|     1|  9   x   x   x   x   x   x   x | 10       |       1      144       56       55 |       1       24       56       55 |  10644480 |
       11|TIDL_EltWiseLayer             |mobilenetv2_1.00_224/block_2_add/add              |     1|     2|     1|  7  10   x   x   x   x   x   x | 11       |       1       24       56       55 |       1       24       56       55 |     73920 |
       12|TIDL_ConvolutionLayer         |/Conv2D;mobilenetv2_1.00_224/block_3_expand/Conv2D|     1|     1|     1| 11   x   x   x   x   x   x   x | 12       |       1       24       56       55 |       1      144       56       55 |  10644480 |
       13|TIDL_PadLayer                 |mobilenetv2_1.00_224/block_3_pad/Pad              |     1|     1|     1| 12   x   x   x   x   x   x   x | 13       |       1      144       56       55 |       1      145       57       55 |         0 |
       14|TIDL_ConvolutionLayer         |pthwise;mobilenetv2_1.00_224/block_2_expand/Conv2D|     1|     1|     1| 13   x   x   x   x   x   x   x | 14       |       1      145       57       55 |       1      144       28       27 |    986580 |
       15|TIDL_ConvolutionLayer         |onv2D;mobilenetv2_1.00_224/block_3_project/Conv2D1|     1|     1|     1| 14   x   x   x   x   x   x   x | 15       |       1      144       28       27 |       1       32       28       27 |   3483648 |
       16|TIDL_ConvolutionLayer         |hNormV3;mobilenetv2_1.00_224/block_4_expand/Conv2D|     1|     1|     1| 15   x   x   x   x   x   x   x | 16       |       1       32       28       27 |       1      192       28       27 |   4644864 |
       17|TIDL_ConvolutionLayer         |D;mobilenetv2_1.00_224/block_4_depthwise/depthwise|     1|     1|     1| 16   x   x   x   x   x   x   x | 17       |       1      192       28       27 |       1      192       28       27 |   1306368 |
       18|TIDL_ConvolutionLayer         |onv2D;mobilenetv2_1.00_224/block_4_project/Conv2D1|     1|     1|     1| 17   x   x   x   x   x   x   x | 18       |       1      192       28       27 |       1       32       28       27 |   4644864 |
       19|TIDL_EltWiseLayer             |mobilenetv2_1.00_224/block_4_add/add              |     1|     2|     1| 15  18   x   x   x   x   x   x | 19       |       1       32       28       27 |       1       32       28       27 |     24192 |
       20|TIDL_ConvolutionLayer         |/Conv2D;mobilenetv2_1.00_224/block_5_expand/Conv2D|     1|     1|     1| 19   x   x   x   x   x   x   x | 20       |       1       32       28       27 |       1      192       28       27 |   4644864 |
       21|TIDL_ConvolutionLayer         |D;mobilenetv2_1.00_224/block_5_depthwise/depthwise|     1|     1|     1| 20   x   x   x   x   x   x   x | 21       |       1      192       28       27 |       1      192       28       27 |   1306368 |
       22|TIDL_ConvolutionLayer         |onv2D;mobilenetv2_1.00_224/block_5_project/Conv2D1|     1|     1|     1| 21   x   x   x   x   x   x   x | 22       |       1      192       28       27 |       1       32       28       27 |   4644864 |
       23|TIDL_EltWiseLayer             |mobilenetv2_1.00_224/block_5_add/add              |     1|     2|     1| 19  22   x   x   x   x   x   x | 23       |       1       32       28       27 |       1       32       28       27 |     24192 |
       24|TIDL_ConvolutionLayer         |/Conv2D;mobilenetv2_1.00_224/block_6_expand/Conv2D|     1|     1|     1| 23   x   x   x   x   x   x   x | 24       |       1       32       28       27 |       1      192       28       27 |   4644864 |
       25|TIDL_PadLayer                 |mobilenetv2_1.00_224/block_6_pad/Pad              |     1|     1|     1| 24   x   x   x   x   x   x   x | 25       |       1      192       28       27 |       1      193       29       27 |         0 |
       26|TIDL_ConvolutionLayer         |pthwise;mobilenetv2_1.00_224/block_4_expand/Conv2D|     1|     1|     1| 25   x   x   x   x   x   x   x | 26       |       1      193       29       27 |       1      192       14       13 |    316134 |
       27|TIDL_ConvolutionLayer         |ormV3;mobilenetv2_1.00_224/block_6_project/Conv2D1|     1|     1|     1| 26   x   x   x   x   x   x   x | 27       |       1      192       14       13 |       1       64       14       13 |   2236416 |
       28|TIDL_ConvolutionLayer         |hNormV3;mobilenetv2_1.00_224/block_7_expand/Conv2D|     1|     1|     1| 27   x   x   x   x   x   x   x | 28       |       1       64       14       13 |       1      384       14       13 |   4472832 |
       29|TIDL_ConvolutionLayer         |D;mobilenetv2_1.00_224/block_7_depthwise/depthwise|     1|     1|     1| 28   x   x   x   x   x   x   x | 29       |       1      384       14       13 |       1      384       14       13 |    628992 |
       30|TIDL_ConvolutionLayer         |onv2D;mobilenetv2_1.00_224/block_7_project/Conv2D1|     1|     1|     1| 29   x   x   x   x   x   x   x | 30       |       1      384       14       13 |       1       64       14       13 |   4472832 |
       31|TIDL_EltWiseLayer             |mobilenetv2_1.00_224/block_7_add/add              |     1|     2|     1| 27  30   x   x   x   x   x   x | 31       |       1       64       14       13 |       1       64       14       13 |     11648 |
       32|TIDL_ConvolutionLayer         |/Conv2D;mobilenetv2_1.00_224/block_8_expand/Conv2D|     1|     1|     1| 31   x   x   x   x   x   x   x | 32       |       1       64       14       13 |       1      384       14       13 |   4472832 |
       33|TIDL_ConvolutionLayer         |D;mobilenetv2_1.00_224/block_8_depthwise/depthwise|     1|     1|     1| 32   x   x   x   x   x   x   x | 33       |       1      384       14       13 |       1      384       14       13 |    628992 |
       34|TIDL_ConvolutionLayer         |onv2D;mobilenetv2_1.00_224/block_8_project/Conv2D1|     1|     1|     1| 33   x   x   x   x   x   x   x | 34       |       1      384       14       13 |       1       64       14       13 |   4472832 |
       35|TIDL_EltWiseLayer             |mobilenetv2_1.00_224/block_8_add/add              |     1|     2|     1| 31  34   x   x   x   x   x   x | 35       |       1       64       14       13 |       1       64       14       13 |     11648 |
       36|TIDL_ConvolutionLayer         |/Conv2D;mobilenetv2_1.00_224/block_9_expand/Conv2D|     1|     1|     1| 35   x   x   x   x   x   x   x | 36       |       1       64       14       13 |       1      384       14       13 |   4472832 |
       37|TIDL_ConvolutionLayer         |D;mobilenetv2_1.00_224/block_9_depthwise/depthwise|     1|     1|     1| 36   x   x   x   x   x   x   x | 37       |       1      384       14       13 |       1      384       14       13 |    628992 |
       38|TIDL_ConvolutionLayer         |onv2D;mobilenetv2_1.00_224/block_9_project/Conv2D1|     1|     1|     1| 37   x   x   x   x   x   x   x | 38       |       1      384       14       13 |       1       64       14       13 |   4472832 |
       39|TIDL_EltWiseLayer             |mobilenetv2_1.00_224/block_9_add/add              |     1|     2|     1| 35  38   x   x   x   x   x   x | 39       |       1       64       14       13 |       1       64       14       13 |     11648 |
       40|TIDL_ConvolutionLayer         |Conv2D;mobilenetv2_1.00_224/block_10_expand/Conv2D|     1|     1|     1| 39   x   x   x   x   x   x   x | 40       |       1       64       14       13 |       1      384       14       13 |   4472832 |
       41|TIDL_ConvolutionLayer         |pthwise;mobilenetv2_1.00_224/block_7_expand/Conv2D|     1|     1|     1| 40   x   x   x   x   x   x   x | 41       |       1      384       14       13 |       1      384       14       13 |    628992 |
       42|TIDL_ConvolutionLayer         |nv2D;mobilenetv2_1.00_224/block_10_project/Conv2D1|     1|     1|     1| 41   x   x   x   x   x   x   x | 42       |       1      384       14       13 |       1       96       14       13 |   6709248 |
       43|TIDL_ConvolutionLayer         |NormV3;mobilenetv2_1.00_224/block_11_expand/Conv2D|     1|     1|     1| 42   x   x   x   x   x   x   x | 43       |       1       96       14       13 |       1      576       14       13 |  10063872 |
       44|TIDL_ConvolutionLayer         |;mobilenetv2_1.00_224/block_11_depthwise/depthwise|     1|     1|     1| 43   x   x   x   x   x   x   x | 44       |       1      576       14       13 |       1      576       14       13 |    943488 |
       45|TIDL_ConvolutionLayer         |nv2D;mobilenetv2_1.00_224/block_11_project/Conv2D1|     1|     1|     1| 44   x   x   x   x   x   x   x | 45       |       1      576       14       13 |       1       96       14       13 |  10063872 |
       46|TIDL_EltWiseLayer             |mobilenetv2_1.00_224/block_11_add/add             |     1|     2|     1| 42  45   x   x   x   x   x   x | 46       |       1       96       14       13 |       1       96       14       13 |     17472 |
       47|TIDL_ConvolutionLayer         |Conv2D;mobilenetv2_1.00_224/block_12_expand/Conv2D|     1|     1|     1| 46   x   x   x   x   x   x   x | 47       |       1       96       14       13 |       1      576       14       13 |  10063872 |
       48|TIDL_ConvolutionLayer         |;mobilenetv2_1.00_224/block_12_depthwise/depthwise|     1|     1|     1| 47   x   x   x   x   x   x   x | 48       |       1      576       14       13 |       1      576       14       13 |    943488 |
       49|TIDL_ConvolutionLayer         |nv2D;mobilenetv2_1.00_224/block_12_project/Conv2D1|     1|     1|     1| 48   x   x   x   x   x   x   x | 49       |       1      576       14       13 |       1       96       14       13 |  10063872 |
       50|TIDL_EltWiseLayer             |mobilenetv2_1.00_224/block_12_add/add             |     1|     2|     1| 46  49   x   x   x   x   x   x | 50       |       1       96       14       13 |       1       96       14       13 |     17472 |
       51|TIDL_ConvolutionLayer         |Conv2D;mobilenetv2_1.00_224/block_13_expand/Conv2D|     1|     1|     1| 50   x   x   x   x   x   x   x | 51       |       1       96       14       13 |       1      576       14       13 |  10063872 |
       52|TIDL_PadLayer                 |mobilenetv2_1.00_224/block_13_pad/Pad             |     1|     1|     1| 51   x   x   x   x   x   x   x | 52       |       1      576       14       13 |       1      577       15       13 |         0 |
       53|TIDL_ConvolutionLayer         |thwise;mobilenetv2_1.00_224/block_11_expand/Conv2D|     1|     1|     1| 52   x   x   x   x   x   x   x | 53       |       1      577       15       13 |       1      576        7        6 |    218106 |
       54|TIDL_ConvolutionLayer         |rmV3;mobilenetv2_1.00_224/block_13_project/Conv2D1|     1|     1|     1| 53   x   x   x   x   x   x   x | 54       |       1      576        7        6 |       1      160        7        6 |   3870720 |
       55|TIDL_ConvolutionLayer         |NormV3;mobilenetv2_1.00_224/block_14_expand/Conv2D|     1|     1|     1| 54   x   x   x   x   x   x   x | 55       |       1      160        7        6 |       1      960        7        6 |   6451200 |
       56|TIDL_ConvolutionLayer         |;mobilenetv2_1.00_224/block_14_depthwise/depthwise|     1|     1|     1| 55   x   x   x   x   x   x   x | 56       |       1      960        7        6 |       1      960        7        6 |    362880 |
       57|TIDL_ConvolutionLayer         |nv2D;mobilenetv2_1.00_224/block_14_project/Conv2D1|     1|     1|     1| 56   x   x   x   x   x   x   x | 57       |       1      960        7        6 |       1      160        7        6 |   6451200 |
       58|TIDL_EltWiseLayer             |mobilenetv2_1.00_224/block_14_add/add             |     1|     2|     1| 54  57   x   x   x   x   x   x | 58       |       1      160        7        6 |       1      160        7        6 |      6720 |
       59|TIDL_ConvolutionLayer         |Conv2D;mobilenetv2_1.00_224/block_15_expand/Conv2D|     1|     1|     1| 58   x   x   x   x   x   x   x | 59       |       1      160        7        6 |       1      960        7        6 |   6451200 |
       60|TIDL_ConvolutionLayer         |;mobilenetv2_1.00_224/block_15_depthwise/depthwise|     1|     1|     1| 59   x   x   x   x   x   x   x | 60       |       1      960        7        6 |       1      960        7        6 |    362880 |
       61|TIDL_ConvolutionLayer         |nv2D;mobilenetv2_1.00_224/block_15_project/Conv2D1|     1|     1|     1| 60   x   x   x   x   x   x   x | 61       |       1      960        7        6 |       1      160        7        6 |   6451200 |
       62|TIDL_EltWiseLayer             |mobilenetv2_1.00_224/block_15_add/add             |     1|     2|     1| 58  61   x   x   x   x   x   x | 62       |       1      160        7        6 |       1      160        7        6 |      6720 |
       63|TIDL_ConvolutionLayer         |Conv2D;mobilenetv2_1.00_224/block_16_expand/Conv2D|     1|     1|     1| 62   x   x   x   x   x   x   x | 63       |       1      160        7        6 |       1      960        7        6 |   6451200 |
       64|TIDL_ConvolutionLayer         |thwise;mobilenetv2_1.00_224/block_14_expand/Conv2D|     1|     1|     1| 63   x   x   x   x   x   x   x | 64       |       1      960        7        6 |       1      960        7        6 |    362880 |
       65|TIDL_ConvolutionLayer         |rmV3;mobilenetv2_1.00_224/block_16_project/Conv2D1|     1|     1|     1| 64   x   x   x   x   x   x   x | 65       |       1      960        7        6 |       1      320        7        6 |  12902400 |
       66|TIDL_ConvolutionLayer         |usedBatchNormV3;mobilenetv2_1.00_224/Conv_1/Conv2D|     1|     1|     1| 65   x   x   x   x   x   x   x | 66       |       1      320        7        6 |       1     1280        7        6 |  17203200 |
       67|TIDL_PoolingLayer             |mobilenetv2_1.00_224/global_average_pooling2d/Mean|     1|     1|     1| 66   x   x   x   x   x   x   x | 67       |       1     1280        7        6 |       1     1280        1        1 |      1280 |
       68|TIDL_InnerProductLayer        |ns/MatMul;mobilenetv2_1.00_224/predictions/BiasAdd|     1|     1|     1| 67   x   x   x   x   x   x   x | 68       |       1     1280        1        1 |       1        1        1     1000 |   1281000 |
       69|TIDL_SoftMaxLayer             |StatefulPartitionedCall:0                         |     1|     1|     1| 68   x   x   x   x   x   x   x | 69       |       1        1        1     1000 |       1        1        1     1000 |      1000 |
       70|TIDL_DataLayer                |StatefulPartitionedCall:0                         |     0|     1|    -1| 69   x   x   x   x   x   x   x |  0       |       1        1        1     1000 |       0        0        0        0 |         0 |
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total Giga Macs : 0.2805
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Pad Layer is not supported by TIDL and cannot be merged into any TIDL layer.
    Pad Layer is not supported by TIDL and cannot be merged into any TIDL layer.
    Pad Layer is not supported by TIDL and cannot be merged into any TIDL layer.
    Pad Layer is not supported by TIDL and cannot be merged into any TIDL layer.
    
    Import error: This TFLite model has operators that are supported by TIDL only if they can be merged with TIDL layers. But these operators cannot be merged with any TIDL layer.
    Please check TIDL User's Guide for supported TFlite operators.
    
    TIDL import failed. Please check error messages. 
    
    

  • Hi Pierrick,

    Thanks for sharing output log, issue is that pad layers were not merged with conv layer for this model, so it is returning errors.

    Pad layer is only supported in the import tool but not in the inference, so we merge this pad layer with following conv layer when it's stride > 1 and pad = kernelSize/2.

    Hence Pad layer in your model is not merging with conv because of the above constraints.

    Thanks,

    Praveen

  • Hi Praveen, 

    I am sorry I missed clicked on the "This resolved my issues" option. 

    When I look at the model definition for mobilenetV2 in Tensorflow I see that the convolution layer after the padding are of size 2 (the pad layer is only added if the stride is equal to 2, and the padding seems of kernelSize/2 (Cf code linked from the following Github page (lines 455 to 467):

    # Depthwise
      if stride == 2:
        x = layers.ZeroPadding2D(
            padding=imagenet_utils.correct_pad(x, 3),
            name=prefix + 'pad')(x)
      x = layers.DepthwiseConv2D(
          kernel_size=3,
          strides=stride,
          activation=None,
          use_bias=False,
          padding='same' if stride == 1 else 'valid',
          name=prefix + 'depthwise')(
              x)

    So my PAD layer should merge without problem into the following conv layer or am I missing something? 

    Thanks 

    Pierrick 

  • Hi Pierrick,

    Kindly share the model file, let me give a try at my end.

    Thanks,

    Praveen

  • Hi Parveen, 

    I cannot include files so here is a line where you can download the model file:

    https://drive.google.com/drive/folders/12b8pqzSUX3dK5AJPjH9OZ24jpZql3HaE

    Under /share_ti/mobileNet_V2_TF_08_06/model_mobileNetV2_08_06.tflite is the model's file.

    I have also attached the conf txt file and the test.png image.

    Thanks a lot for your time and help ! 

    Best 

    Pierrick 

  • Hi Pierrick,

    I am trying import the tflite model shared and getting this error, and is expected as we don't support TFlite models on AM5729.

     "Invalid modelType parameter setting : set either 0 or 1"

    The supported " modelType " parameter values are 0 or 1 or 2, I am wondering how you can import this tflite model and getting error about PAD layer, kindly share more details on how you are importing .

    Refer here for import steps :

    https://software-dl.ti.com/processor-sdk-linux/esd/docs/05_03_00_07/linux/Foundational_Components_TIDL.html#import-process

    modelType can be either 0, 1, or 2. Default value is 0. 0 - caffe frame work, 1 - tensor flow frame work, 2 - ONNX frame work.

    Thanks,

    Praveen

  • Hi Praveen, 

    I have followed the step described in this thread, you indeed mentionned that TFlite is not supported but the rest of the thread specifies that it does. Additionally, later versions of the documentation clearly states the following:

    "

    TIDL supports topologies described in the following framework formats:

    • Caffe
    • TensorFlow
    • TensorFlow Lite
    • ONNX

    "

     (cf. version of the SDK 06_03_00_106 https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Foundational_Components/Machine_Learning/tidl.html)

    I am using the latest version of the SDK with the config file that I have attached with the rest of the code on the google drive folder shared above.

    Would you please let me know if you need anything more from me? 

    Best 

    Pierrick 

  • Hi Praveen, 

    I would like to know if you have any updates on that? 

    Best 

    Pierrick