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.

AM5728: TIDL conversion issues

Guru 10235 points
Part Number: AM5728
Other Parts Discussed in Thread: TMDSEVM572X

Hello, TI Experts,

 

I have additional question from the below E2E-thread about TIDL.

 https://e2e.ti.com/support/processors/f/791/t/735984

I tried to convert to "inceptionnet_v1.pb" based on the E2E-thread with below environment.

   - SDK: ti-processor-sdk-linux-am57xx-evm-06.00.00.07

   - EVM: TMDSEVM572X

 

But it seems to fail with errors like below;

 

Here is detail:

   > activate tf1.1_env

   Download from https://github.com/tensorflow/models

   >cd inception\inception

   >python freeze_inception_net_v1.py ( copy from python_freeze_graph.zip )

   (copy from ..Lib\site-packages\tensorflow\python\tools\optimize_for_inference.py )

   >python optimize_for_inference.py --input=inception_v1.pb --output=inceptionnet_v1.pb --input_names=input --output_name=softmax/Softmax

Then, convert to tidl files on TMDSEVM572X

evm> tidl_model_import.out.exe tidl_import_inceptionNetv1.txt

 

Question:

- Do you have same experience?

 

I would like to attached related files.

So, I would appreciate if you check the behavior with your EVM and tell us how to solve this problem.

Best regards,

e2efiles.zip

  • Hi,

    Thank you for your patience.  We are looking into your question.

    Regards,
    Mike

  • Hi,

    Thank you very much for your kindness.

    I really appreciate your help.

    We are waiting for the answer.

     

    Best regards,

  • Hello - I'm currently working on replicating on my EVM. Did you do the training and setup on a Windows or Linux machine? If Linux, which distribution? Just making sure that I'm replicating correctly.

    Cheers,

    Caleb

  • Hi,

    Thank you very much for your kindness.

    I really appreciate your help.

     

    I use Linux(ubuntu-18.04.2).

     

    We are waiting for the answer/guide to solve the problem.

     

    Best regards,

  • Hi,

     

    Sorry, it seemed to lack of information.

    I'd like to send the detail again on my previous post.

       - I also use windows10 anaconda (Anaconda Navigator 1.9.7) in python(3.5.6) operation

     

    Here is detail:

       windows10 (anaconda)> activate tf1.1_env

     

          Download from https://github.com/tensorflow/models

       windows10 (anaconda)>cd inception\inception

     

       windows10 (anaconda)>python freeze_inception_net_v1.py ( copy from python_freeze_graph.zip )

     

       (copy from ..Lib\site-packages\tensorflow\python\tools\optimize_for_inference.py )

     

       windows10 (anaconda)>python optimize_for_inference.py --input=inception_v1.pb --output=inceptionnet_v1.pb --input_names=input --output_name=softmax/Softmax

     

    Then, convert to tidl files on TMDSEVM572X

     

    I use Linux(ubuntu-18.04.2) with TFTP-boot

      evm> tidl_model_import.out.exe tidl_import_inceptionNetv1.txt

     

    Best regards,

  • Matusan,

    I have found a similar result on my machine. The TIDL library does not support those operations (this is documented in the link below - section 3.15.2.1).

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_TIDL.html#developer-s-guide

    You will need to work around using NN operations by using an L1 norm layer instead of an L2 (L2's require square root operations) and by eliminating the need for subtractions.

    Regards,

    Caleb

  • Hi,

    Thank you very much for your kindness.

    I really appreciate your help.

     

    I understand you also found the same situation on your side.

    And it seems to be used TIDL-unsupport operation such as L2 (L2's require square root operations).

     

    Question:

      Could you tell us the successful procedure with below E2E-thread?

      https://e2e.ti.com/support/processors/f/791/t/735984

     

    We would appreciate if you fix the TIDL conversion detail procedure of below E2E-thread.

      https://e2e.ti.com/support/processors/f/791/t/735984

     

    Download inception_v1.ckpt from :

    •Reset Models repo to :5eab06018c51d0ec8bf85919bf50438e2c4056a3 - MobileNet V1 commit (#1551)

    •Download attached script freeze_inception_net_v1.py and copy it to the directory pointed by the environment variable %TF_TOOLS_1.1%

    •Open the script freeze_inception_net_v1.py and verify that the variable models_slim_dir is set to os.getenv('TF_MODELS')+"/slim" .

    •Open an Anaconda Prompt

    •Type: activate tf1.1_env

    •Type: cd %TF_MODELS%\inception\inception

    •Type: python "%TF_TOOLS_1.1%\freeze_inception_net_v1.py"

    •Type: python "%TF_TOOLS_1.1%\optimize_for_inference.py" --input=inception_v1.pb --output=inceptionnet_v1.pb --input_names=input --output_name=softmax/Softmax

    •Type: xcopy inceptionnet_v1.pb %TI_DL_IMPORT%\test\testvecs\config\tensorflow_models\inceptionnet_V1\inceptionnet_v1.pb

    •Type: cd %TI_DL_IMPORT%\utils\tidlModelImport

    •Type: tidl_model_import.out.exe ..\..\test\testvecs\config\import\tidl_import_inceptionNetv1.txt

    •Verify the presence of files tidl_inception_v1_net.bin and tidl_inception_v1_param.bin and their timestamps in %TI_DL_IMPORT%\test\testvecs\config\tidl_models

    •Copy these files into %TI_DL% directory: xcopy %TI_DL_IMPORT%\test\testvecs\config\tidl_models\tidl_inception_v1_* %TI_DL%\test\testvecs\config\tidl_models\

    •Test the model by running the inference in host emulation, using the default configuration for inception net. For that edit the first 2 lines %TI_DL%\test\testvecs\config\config_list.txt:

    1 ..\..\test\testvecs\config\infer\tidl_config_inceptionNetv1.txt

    0

    •Type: cd %TI_DL%\test\out

    •Type: dsp_test_dl_algo.out.exe

    Verify that the log finishes with: Layer 82 :-------Max Index 896 : 254 ------- TSC Cycles = 0.00

     

    Best regards,