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: Sigmoid layer conversion issue

Part Number: TDA4VM

Goodmorning,

I have a problem converting an ONNX model containing a Sigmoid layer (that should be now supported by TIDL in the latest version 7.2).
When I launch the model conversion, I notice that the generated binary model shows 2 unexpected differences


1) The Sigmoid layer is converted to a TIDL_BatchNormLayer instead of a TIDL_SigmoidLayer. Is it still fine that the Sigmoid is converted with the BatchNorm layer? Why isn't it converted to a TIDL_SigmoidLayer?


2) the output of the Sigmoid layer must be connected to a MaxPool and must be an output of the model as well. So at the end I should have 2 outputs, one after the Sigmoid layer and one after the MaxPool one. The issue here is that the converted model has only one output: the one after the MaxPool layer. Why the import tool doesn't recognize the Sigmoid as model output as well?

Attached you can find a very simple model  with few layers that shows both these issues together with our conversion log and script.

Regards,

Federico 

sigmoid_issue.zip

  • Hi Federico,

    1. Is it still fine that the Sigmoid is converted with the BatchNorm layer? Why isn't it converted to a TIDL_SigmoidLayer?

    Yes, we don't have separate sigmoid layer in TIDL, we use the BatchNorm layer dataflow to support sigmoid layer as well, so in the imported network Sigmoid will be replaced as BatchNorm Layer and hence this should be okay.

    2. Why the import tool doesn't recognize the Sigmoid as model output as well?

    This issue we will check and come back.

    Thanks,

    Praveen

  • Hello Praveen,

    Thanks for the clarification on the Sigmoid layer.

    About the second point, I want to let you know that the problem seem not related to the Sigmoid layer itself, but to this kind of structure where we have 2 consecutive layers which are also outputs of the model. I have the very same issue with a similar model where the Sigmoid layer is not present ( a Conv layer followed by a MaxPool one, both those layers' outputs are also outputs of the model).

    I don't know if this information can help you in any way, but I noticed that, while the conversion seems to run successfully (while it miss one output of the model instead), the Graph Visualizer Tool launched on the converted .bin file fails with the following error:

    *** buffer overflow detected ***: /home/ubuntu/TIDL/ti_dl/utils/tidlModelGraphviz/out/tidl_graphVisualiser.out terminated
    Aborted (core dumped)

    Do you have any suggestion on how to solve this issue with the model's outputs?

    Thanks a lot,

    Federico

  • Hi Federico,

    The information you use shared is helpful for debugging this issue, we found that there is issue in our logic to find the outputs in the model and hence you are seeing these issues.

    We are working on fixing this issue. We will keep you updated on this.

    Thanks,

    Praveen

  • Hi Federico,

    If the model is having more than one output then current implementation excepts the user to set output names in the import config file.

    So, please set output names in the import config file and then try to import your model. Add below line your import config file,

    outDataNamesList = "531,532"

    Thanks,

    Praveen

  • Hello Praveen,

    I confirm that adding all the outputs names in the import config file solves the issue.

    Thanks for the support

    Regards,

    Federico

  • Hi Federico,

    Thanks for the update, I am closing this thread. Please feel free to open this thread if you have further questions on this topic.

    Regards,

    Praveen