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.

TDA4 model inference problem

Hi,

I am trying to import and run inference using binary file as input data.

It's fine in the import phase.

When running the inference by run ./PC_dsp_test_dl_algo.out.

Here's the error message:

Error at line: 208 : in file src/tidl_tb.c, of function : tidl_tb_algCreate
Error Type: TIDL_E_QUANT_STATS_NOT_AVAILABLE
Error at line: 479 : in file src/tidl_tb.c, of function : tidlMultiInstanceTest
Error Type: TIDL_E_QUANT_STATS_NOT_AVAILABLE

---------------------------------------------------------------------------------------------------------------------------------------

Import.txt

modelType = 0
inputNetFile = "../../test/testvecs/models/public/caffe/test/Model.prototxt"
inputParamsFile = "../../test/testvecs/models/public/caffe/test/Model.caffemodel"
outputNetFile = "../../test/testvecs/config/tidl_models/caffe/tidl_net_mm.bin"
outputParamsFile = "../../test/testvecs/config/tidl_models/caffe/tidl_io_mm"
inElementType = 0
inFileFormat = 1
perfSimConfig = ../../test/testvecs/config/import/perfsim_base.cfg
tidlStatsTool = ../../test/tidl_quant_stats_tool.out
inData = ../../test/testvecs/input/input.bin
postProcType = 0
foldMaxPoolInConv2D = 0

---------------------------------------------------------------------------------------------------------------------------------------

inference.txt

inFileFormat = 1
postProcType = 0
padInBuffInTB = 1
netBinFile = "testvecs/config/tidl_models/caffe/oToBrite/tidl_net_mm.bin"
ioConfigFile = "testvecs/config/tidl_models/caffe/oToBrite/tidl_io_mm1.bin"
outData = testvecs/output/out.bin
inData = testvecs/input/input.bin
totNumClasses = 8
debugTraceLevel = 3
writeTraceLevel = 3

---------------------------------------------------------------------------------------------------------------------------------------

Is there any mistake I have made in my import.txt or infer.txt?

Thank you.

  • Hi,

    Do you have this file: tidl_j7_01_00_00_00\ti_dl\test\tidl_quant_stats_tool.out?

    If yes then import did not happen successfully.

    It could be due to unsupported layers or unsupported layer parameters.

    For layer information you can refer to psdk_rtos_auto_j7_06_01_00_15/tidl_j7_01_00_00_00/ti_dl/docs/user_guide_html/md_tidl_layers_info.html

    If you still face issues please share the import logs.

    Regards,

    Rishabh

  • Thanks for reply,

    ConvolutionLayer ,DeconvLayer and ArgMaxLayer  are used in our model only.

    After import I got the message as below:

    ~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~

    Processing config file #0 : /home/tda4dev/psdk_rtos_auto_j7_06_01_00_15/tidl_j7_01_00_00_00/ti_dl/utils/tidlModelImport/tempDir/qunat_stats_config.txt
    ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

    # 0 . ..
    ------------------ Network Compiler Traces -----------------------------
    Main iteration numer: 0....
    Preparing for memory allocation : internal iteration number: 0
    successful Memory allocation

    -------------------- Network Compiler : Analysis Results are available --------------------

    SUGGESTION: [TIDL_Deconv2DLayer] Panoptic3_up Please change to Upsample/Resize if possible. Upsample/Resize will be more efficient.
    SUGGESTION: [TIDL_Deconv2DLayer] deconv2 Please change to Upsample/Resize if possible. Upsample/Resize will be more efficient.
    SUGGESTION: [TIDL_Deconv2DLayer] deconv1 Please change to Upsample/Resize if possible. Upsample/Resize will be more efficient.
    ****************************************************
    ** ALL MODEL CHECK PASSED **
    ****************************************************

    Thank you

  • Hi,

    QS tool has crashed as there are no logs during import.

    What are the kernel properties of de-convolution layers?

    Please note that only 4x4 kernel with 2x2 stride is supported.

    Regards,

    Rishabh

  • Hi,

    Deconv layer:

    layer {
      name: "deconv1"
      type: "Deconvolution"
      bottom: "conv"
      top: "deconv1"
      param {
        lr_mult: 0.0
        decay_mult: 0.0
      }
      convolution_param {
        num_output: 8
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 8
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }

    This is the deconvolution setting.

    Kernel_size = 4 and stride = 2 are the same in all deconv layer.

    Thank you.

  • Hi,

    Deconvolution parameters look correct.

    There must be some other layer that is not supported by TIDL.

    Did you look at psdk_rtos_auto_j7_06_01_00_15/tidl_j7_01_00_00_00/ti_dl/docs/user_guide_html/md_tidl_layers_info.html?

    Regards,

    Rishabh