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.

TIDL import tensorflow model issue



Hello,

I have tried to import pre-trained MobileNet model using tensorflow. I have downloaded MobileNet_v1_1.0_224 model from below link:

https://github.com/tensorflow/models/tree/master/research/slim

This is changed import file:

# Default - 0
randParams = 0

# 0: Caffe, 1: TensorFlow, Default - 0
modelType = 1

# 0: Fixed quantization By tarininng Framework, 1: Dyanamic quantization by TIDL, Default - 1
quantizationStyle = 1

# quantRoundAdd/100 will be added while rounding to integer, Default - 50
quantRoundAdd = 50

numParamBits = 10

inputNetFile = "..\..\test\testvecs\config\tensorflow_models\mobilenet\mobilenet_1_224.pb"
inputParamsFile = "NA"
outputNetFile = "..\..\test\testvecs\config\tidl_models\tidl_net_mobilenet_1_224.bin"
outputParamsFile = "..\..\test\testvecs\config\tidl_models\tidl_param_mobilenet_1_224.bin"

preProcType = 2
sampleInData = "..\..\test\testvecs\input\preproc_0_224x224.y"
tidlStatsTool = "..\quantStatsTool\eve_test_dl_algo.out.exe"

inWidth = 224
inHeight = 224
inNumChannels = 3

When I am trying to run importTestCases.bat for generating related .bin files then I am getting tidl_log like  :

"

TF Model File : ..\..\test\testvecs\config\tensorflow_models\mobilenet\mobilenet_1_224.pb
Could not find the requested input Data : MobilenetV1/Logits/Dropout_1b/Identity !!

"

and generated bin files are 0KB.

Please guide and let me know the correct way to import it.

  • Hi,

    Could you please attach the complete tidl_log file that you got while importing

    Thanks,
    Praveen
  • Hi Praveen,

    Please find attached tidl_log.txt but it only contains below two lines:

    "

    TF Model File : ..\..\test\testvecs\config\tensorflow_models\mobilenet\mobilenet_v1_0.5_160_frozen.pb  

    Could not find the requested input Data : MobilenetV1/Logits/Dropout_1b/Identity !!

    "

    TF Model File : ..\..\test\testvecs\config\tensorflow_models\mobilenet\mobilenet_1_224.pb 
    Could not find the requested input Data : MobilenetV1/Logits/Dropout_1b/Identity !!

    Thanks,

    Sayali

  • Hi Sayali,

    You may need to optimize frozen graphs before giving it to tidl, for more details

    Please refer to section 3.6.5 (Importing Tensorflow Models) in the user guide.

    Also, Please refer below e2e to build tensoflow model for TIDL
    e2e.ti.com/.../689876


    Thanks,
    Praveen
  • Hi Praveen,

    I referred the section 3.6.5, optimized frozen graphs for MobileNet and tried to run the generated .pb but it's also showing error in tidl_log.txt file as :

    "

    TF Model File : ..\..\test\testvecs\config\tensorflow_models\mobilenet\mobilenet_v1_1.0_224_final.pb  

    Could not find the requested input Data : MobilenetV1/MobilenetV1/Conv2d_0/Relu6 !!

    "

    Please find attached .pb(remove .txt) for the same.

    mobilenet_v1_1.0_224_final.txt

    About the reference link, I ran the model successfully, but I am not able to visualize the resultant bin.

    Is there any way to visualize it?

    Thanks,

    Sayali

  • The example network is a classification network and output is score for each class (10). There is no visualisation needed.