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.

TMDSEVM572X: TIDL ONNX model import problem and ArmNN CaffeParser problem

Part Number: TMDSEVM572X
Other Parts Discussed in Thread: TDA4VM

Hardware: TMDSEVM572X

SDK: Processor SDK LInux 06_03_00_106

Hello, TI!

(1) When I tried to import a ONNX model exported by the latest Pytorch(I set opset=9), the TIDL model import program outputs error as follows:

[libprotobuf FATAL /oe/bld/build-CORTEX_1/arago-tmp-external-arm-toolchain/work/armv7at2hf-neon-linux-gnueabi/tidl-import/01.01.03.02-r1/recipe-sysroot/usr/include/google/protobuf/repeated_field.h:1167] CHECK failed: (index) < (current_size_): 
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  CHECK failed: (index) < (current_size_): 
All of the layers should be suppoted. Is it because of the Pytorch version? Possible to tell the specific version of Pytorch?

(2) I succefully compiled the ArmNN CaffeParser program. When the program tried to read the caffemodel, it outputs errors as follows:

terminate called after throwing an instance of 'armnn::ParseException'
  what():  Data blob at index 0 in layer conv1 has an unexpected size. Expected 1728 elements but got 0 elements.  at function GetDataFromBlob [/oe/bld/build-CORTEX_1/arago-tmp-external-arm-toolchain/work/armv7at2hf-neon-linux-gnueabi/armnn/19.08-r4/git/src/armnnCaffeParser/CaffeParser.cpp:115]

I searched some solutions.  Use an "Input" layer as the network input and save an inference caffemodel(scripts as below) both in caffe and caffe-jacinto. It still outputs the same saying the layer1 has no elements.

import caffe
net = caffe.Net(deploy_prototxt, trained_model, caffe.TEST)
net.save(inference_model)

Is there any solution?

Thank you, TI!

  • Progress up to date:

    I solved the ONNX model import problem by keeping the probuf and libprotobuf version the same as the version included in the SDK(3.6.1).

    Still stuck in ArmNNCaffeParser one. It still outputs the same error even though I saved the caffemodel with the new protobuf and libprotobuf.

    And I also tested the ArmNNOnnxParser, when the program goes to "armnn::INetworkPtr network = parser->CreateNetworkFromBinaryFile("model.onnx");"

    The program outputs "segmentation fault"

    Is there any solution about the ArmNNParser?

    Thanks in advance.

  • Hi,

    Do you have any production planned with part Part Number: TMDSEVM572X? This is very old part from TI specially for NN workloads and we recommend to use more recent parts like TDA4VM for NN tasks (https://www.ti.com/tool/SK-TDA4VM)

    Thanks,

    Pramod

  • Hi,

    Yes. Planning to deploy a regression model on this  board. All of the network layers are supported according to the documents. And the application takes the output of the last convolution layer as the result.

    I tried to train the model in caffe-jacinto. The model worked well in PC. When deployed on the board, the result degraded so bad. I guessed maybe it was because the TIDL is only for classification, object detection and segmentation.

    That's why I tried  the ONNX and ArmCaffeParser.

    Am I guessing right?

    (1) TIDL is only for classification, object detection and segmentation.

    (2) TIDL only supports the network listed in the SDK doc.

  • Hi, TIDL version on AM57x was developed mainly for CNN. However, other type of networks could work.

    I know your mention your development is targeting to use AM57x, but let me suggest to use our TI EdgeAI cloud which has a farm of TDA4 devices. If your  model still have issues running on TDA4 we can take a look. Just FYI, we have a low cost EVM (SK-TDA4VM) which could be attractive to your development.

    https://dev.ti.com/edgeaisession/ 

    if you want to try TI EdgeAI cloud, and you face any issues logging in, let us know.

    thank you,

    Paula

  • Thank you, Paula.

    Thank you, Pramod.