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: using edgeai-tidl-tools to train custum model

Part Number: TDA4VM

Hi,

I have been trying to finb an exammple about how to train an onyx model on https://github.com/TexasInstruments/edgeai-tidl-tools.

However, all i could find is the how to use the mnodel zoo;s example in the onyxrt_ep.py.

Is there a guide for it? or i should just use this pyton scriupt as a guide?

Another question  is afer i train the model, how do i it in my c++ code?

Thanks,

  Oren

  • Hi Oren,

    The training source code for the models used by edgeai-tidl-tools can be found in the edgeai-modelzoo repository: https://github.com/TexasInstruments/edgeai-modelzoo

    For example, if you would like to train an image classification model, it can be found under the classification directory: https://github.com/TexasInstruments/edgeai-modelzoo/tree/master/models/vision/classification

    Could you try looking through these documentation?

    Regards,

    Takuma

  • Hi Takuma, 

    Thanks for the reply.

    However, we need to use curtum models and not the model's zoo,

    What i need to do is to convert an h5(keras) to onyx and then train the model. 

    as described here in the image, but it is not a part of the documentation.

    Currently i am trying to use the edge torchvision but there is also no examples there about how to use custum models.

    Thanks,

    Oren

  • Hi Takuma, 

    Since we need to train out own propaietrty model, and not use the your models's Zoo,  i have into your edgeai-torchvision which is an extesion of pyTorch's torchvision library. Your README.md specifiues directly that torchciion should be installed using your own setup.sh. 

    I have ran it,  but i try to import torchvision.datasets wiith the below command, 

    sys.path.append("edgeai-torchvision")
    from torchvision.datasets import *
    i get the below error:
    Traceback (most recent call last):
    File "./train_model.py", line 5, in <module>
    from torchvision.datasets import *
    File "/home/orensanderovich/projects/ti_boards_support/edgeai-torchvision/torchvision/__init__.py", line 4, in <module>
    from .extension import _HAS_OPS
    File "/home/orensanderovich/projects/ti_boards_support/edgeai-torchvision/torchvision/extension.py", line 1, in <module>
    import torch
    ModuleNotFoundError: No module named 'torch'
    it seems that some moduls are missing?
    Also, is this the right example for trianing a custum model?
    Thanks
    Oren