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: Importing models and running imported models on target

Part Number: TDA4VM

Hi TI,

I use TI official open source project "github.com/.../caffe-0.17" for semantic segmentation model training. The following three models are used:

  1. jsegnet21v2
  2. mobilesegnet-1.0
  3. mobilesegnetv2-1.0

The above model uses scripts "https://github.com/mathmanu/caffe-jacinto-models/blob/caffe-0.17/scripts/train_mobilenet_segmentation.sh".

When TIDL toolkit is used for model transformation on PC, the three models are successfully transformed and the correct results can be output. The following are the commands executed and the output:

the left is the input image, the right is output result of the transformed model:

No problems were encountered in the above three model transformations and the output results of the model on PC.  However, when the transformed model is run on TDA4 embedded device, there is a problem: only jsegnet21v2 model can get the correct prediction results, while mobilesegnet-1.0 and mobilesegnetv2-1.0 models can't output the prediction results normally.  I looked at the model files of the three models and compared the supported Caffe model layer types in the documentation and found that all layers of the models were within the supported range.  

  • The output of jsegnet21v2  model on TDA4 is normal

  • The output of the mobilesegnet-1.0 model on TDA4 is abnormal

  • The output of the mobilesegnetv2-1.0 model on TDA4 is abnormal

This problem has bothered me for a long time. I hope you can help me solve it. thanks.

Regards,

Damon

  • Could you please share the application (Binary file location in SDK) that you are using to test these models on Device?

    BTW, the steps in the below doc can be used for debugging the functional mismatches 

    software-dl.ti.com/.../md_tidl_fsg_steps_to_debug_mismatch.html

  • Hi kumar:

    Thank you for answering my question. By 'Device', do you mean my simulation PC ? 

    I wonder if there is something wrong with the model itself.

    This is my Caffe training network:

    name: "mobilesegnett1-1.0_train"
    layer {
      name: "data"
      type: "ImageLabelData"
      top: "data"
      top: "label"
      transform_param {
        mirror: true
        crop_size: 320
        mean_value: 0.0
      }
      image_label_data_param {
        image_list_path: "../data/train-image-lmdb"
        label_list_path: "../data/train-label-lmdb"
        batch_size: 8
        shuffle: true
        threads: 1
        backend: LMDB
      }
    }
    layer {
      name: "data/bias"
      type: "Bias"
      bottom: "data"
      top: "data/bias"
      param {
        lr_mult: 0.0
        decay_mult: 0.0
      }
      bias_param {
        filler {
          type: "constant"
          value: -128.0
        }
      }
    }
    layer {
      name: "conv1"
      type: "Convolution"
      bottom: "data/bias"
      top: "conv1"
      convolution_param {
        num_output: 32
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 1
        stride: 2
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv1/bn"
      type: "BatchNorm"
      bottom: "conv1"
      top: "conv1"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu1"
      type: "ReLU"
      bottom: "conv1"
      top: "conv1"
    }
    layer {
      name: "conv2_1/dw"
      type: "Convolution"
      bottom: "conv1"
      top: "conv2_1/dw"
      convolution_param {
        num_output: 32
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 32
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv2_1/dw/bn"
      type: "BatchNorm"
      bottom: "conv2_1/dw"
      top: "conv2_1/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu2_1/dw"
      type: "ReLU"
      bottom: "conv2_1/dw"
      top: "conv2_1/dw"
    }
    layer {
      name: "conv2_1/sep"
      type: "Convolution"
      bottom: "conv2_1/dw"
      top: "conv2_1/sep"
      convolution_param {
        num_output: 64
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv2_1/sep/bn"
      type: "BatchNorm"
      bottom: "conv2_1/sep"
      top: "conv2_1/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu2_1/sep"
      type: "ReLU"
      bottom: "conv2_1/sep"
      top: "conv2_1/sep"
    }
    layer {
      name: "conv2_2/dw"
      type: "Convolution"
      bottom: "conv2_1/sep"
      top: "conv2_2/dw"
      convolution_param {
        num_output: 64
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 64
        stride: 2
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv2_2/dw/bn"
      type: "BatchNorm"
      bottom: "conv2_2/dw"
      top: "conv2_2/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu2_2/dw"
      type: "ReLU"
      bottom: "conv2_2/dw"
      top: "conv2_2/dw"
    }
    layer {
      name: "conv2_2/sep"
      type: "Convolution"
      bottom: "conv2_2/dw"
      top: "conv2_2/sep"
      convolution_param {
        num_output: 128
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv2_2/sep/bn"
      type: "BatchNorm"
      bottom: "conv2_2/sep"
      top: "conv2_2/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu2_2/sep"
      type: "ReLU"
      bottom: "conv2_2/sep"
      top: "conv2_2/sep"
    }
    layer {
      name: "conv3_1/dw"
      type: "Convolution"
      bottom: "conv2_2/sep"
      top: "conv3_1/dw"
      convolution_param {
        num_output: 128
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 128
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv3_1/dw/bn"
      type: "BatchNorm"
      bottom: "conv3_1/dw"
      top: "conv3_1/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu3_1/dw"
      type: "ReLU"
      bottom: "conv3_1/dw"
      top: "conv3_1/dw"
    }
    layer {
      name: "conv3_1/sep"
      type: "Convolution"
      bottom: "conv3_1/dw"
      top: "conv3_1/sep"
      convolution_param {
        num_output: 128
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv3_1/sep/bn"
      type: "BatchNorm"
      bottom: "conv3_1/sep"
      top: "conv3_1/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu3_1/sep"
      type: "ReLU"
      bottom: "conv3_1/sep"
      top: "conv3_1/sep"
    }
    layer {
      name: "conv3_2/dw"
      type: "Convolution"
      bottom: "conv3_1/sep"
      top: "conv3_2/dw"
      convolution_param {
        num_output: 128
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 128
        stride: 2
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv3_2/dw/bn"
      type: "BatchNorm"
      bottom: "conv3_2/dw"
      top: "conv3_2/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu3_2/dw"
      type: "ReLU"
      bottom: "conv3_2/dw"
      top: "conv3_2/dw"
    }
    layer {
      name: "conv3_2/sep"
      type: "Convolution"
      bottom: "conv3_2/dw"
      top: "conv3_2/sep"
      convolution_param {
        num_output: 256
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv3_2/sep/bn"
      type: "BatchNorm"
      bottom: "conv3_2/sep"
      top: "conv3_2/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu3_2/sep"
      type: "ReLU"
      bottom: "conv3_2/sep"
      top: "conv3_2/sep"
    }
    layer {
      name: "conv4_1/dw"
      type: "Convolution"
      bottom: "conv3_2/sep"
      top: "conv4_1/dw"
      convolution_param {
        num_output: 256
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 256
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv4_1/dw/bn"
      type: "BatchNorm"
      bottom: "conv4_1/dw"
      top: "conv4_1/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu4_1/dw"
      type: "ReLU"
      bottom: "conv4_1/dw"
      top: "conv4_1/dw"
    }
    layer {
      name: "conv4_1/sep"
      type: "Convolution"
      bottom: "conv4_1/dw"
      top: "conv4_1/sep"
      convolution_param {
        num_output: 256
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv4_1/sep/bn"
      type: "BatchNorm"
      bottom: "conv4_1/sep"
      top: "conv4_1/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu4_1/sep"
      type: "ReLU"
      bottom: "conv4_1/sep"
      top: "conv4_1/sep"
    }
    layer {
      name: "conv4_2/dw"
      type: "Convolution"
      bottom: "conv4_1/sep"
      top: "conv4_2/dw"
      convolution_param {
        num_output: 256
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 256
        stride: 2
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv4_2/dw/bn"
      type: "BatchNorm"
      bottom: "conv4_2/dw"
      top: "conv4_2/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu4_2/dw"
      type: "ReLU"
      bottom: "conv4_2/dw"
      top: "conv4_2/dw"
    }
    layer {
      name: "conv4_2/sep"
      type: "Convolution"
      bottom: "conv4_2/dw"
      top: "conv4_2/sep"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv4_2/sep/bn"
      type: "BatchNorm"
      bottom: "conv4_2/sep"
      top: "conv4_2/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu4_2/sep"
      type: "ReLU"
      bottom: "conv4_2/sep"
      top: "conv4_2/sep"
    }
    layer {
      name: "conv5_1/dw"
      type: "Convolution"
      bottom: "conv4_2/sep"
      top: "conv5_1/dw"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 512
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_1/dw/bn"
      type: "BatchNorm"
      bottom: "conv5_1/dw"
      top: "conv5_1/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_1/dw"
      type: "ReLU"
      bottom: "conv5_1/dw"
      top: "conv5_1/dw"
    }
    layer {
      name: "conv5_1/sep"
      type: "Convolution"
      bottom: "conv5_1/dw"
      top: "conv5_1/sep"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_1/sep/bn"
      type: "BatchNorm"
      bottom: "conv5_1/sep"
      top: "conv5_1/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_1/sep"
      type: "ReLU"
      bottom: "conv5_1/sep"
      top: "conv5_1/sep"
    }
    layer {
      name: "conv5_2/dw"
      type: "Convolution"
      bottom: "conv5_1/sep"
      top: "conv5_2/dw"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 512
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_2/dw/bn"
      type: "BatchNorm"
      bottom: "conv5_2/dw"
      top: "conv5_2/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_2/dw"
      type: "ReLU"
      bottom: "conv5_2/dw"
      top: "conv5_2/dw"
    }
    layer {
      name: "conv5_2/sep"
      type: "Convolution"
      bottom: "conv5_2/dw"
      top: "conv5_2/sep"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_2/sep/bn"
      type: "BatchNorm"
      bottom: "conv5_2/sep"
      top: "conv5_2/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_2/sep"
      type: "ReLU"
      bottom: "conv5_2/sep"
      top: "conv5_2/sep"
    }
    layer {
      name: "conv5_3/dw"
      type: "Convolution"
      bottom: "conv5_2/sep"
      top: "conv5_3/dw"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 512
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_3/dw/bn"
      type: "BatchNorm"
      bottom: "conv5_3/dw"
      top: "conv5_3/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_3/dw"
      type: "ReLU"
      bottom: "conv5_3/dw"
      top: "conv5_3/dw"
    }
    layer {
      name: "conv5_3/sep"
      type: "Convolution"
      bottom: "conv5_3/dw"
      top: "conv5_3/sep"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_3/sep/bn"
      type: "BatchNorm"
      bottom: "conv5_3/sep"
      top: "conv5_3/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_3/sep"
      type: "ReLU"
      bottom: "conv5_3/sep"
      top: "conv5_3/sep"
    }
    layer {
      name: "conv5_4/dw"
      type: "Convolution"
      bottom: "conv5_3/sep"
      top: "conv5_4/dw"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 512
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_4/dw/bn"
      type: "BatchNorm"
      bottom: "conv5_4/dw"
      top: "conv5_4/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_4/dw"
      type: "ReLU"
      bottom: "conv5_4/dw"
      top: "conv5_4/dw"
    }
    layer {
      name: "conv5_4/sep"
      type: "Convolution"
      bottom: "conv5_4/dw"
      top: "conv5_4/sep"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_4/sep/bn"
      type: "BatchNorm"
      bottom: "conv5_4/sep"
      top: "conv5_4/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_4/sep"
      type: "ReLU"
      bottom: "conv5_4/sep"
      top: "conv5_4/sep"
    }
    layer {
      name: "conv5_5/dw"
      type: "Convolution"
      bottom: "conv5_4/sep"
      top: "conv5_5/dw"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 512
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_5/dw/bn"
      type: "BatchNorm"
      bottom: "conv5_5/dw"
      top: "conv5_5/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_5/dw"
      type: "ReLU"
      bottom: "conv5_5/dw"
      top: "conv5_5/dw"
    }
    layer {
      name: "conv5_5/sep"
      type: "Convolution"
      bottom: "conv5_5/dw"
      top: "conv5_5/sep"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_5/sep/bn"
      type: "BatchNorm"
      bottom: "conv5_5/sep"
      top: "conv5_5/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_5/sep"
      type: "ReLU"
      bottom: "conv5_5/sep"
      top: "conv5_5/sep"
    }
    layer {
      name: "conv5_6/dw"
      type: "Convolution"
      bottom: "conv5_5/sep"
      top: "conv5_6/dw"
      convolution_param {
        num_output: 512
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 512
        stride: 2
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_6/dw/bn"
      type: "BatchNorm"
      bottom: "conv5_6/dw"
      top: "conv5_6/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_6/dw"
      type: "ReLU"
      bottom: "conv5_6/dw"
      top: "conv5_6/dw"
    }
    layer {
      name: "conv5_6/sep"
      type: "Convolution"
      bottom: "conv5_6/dw"
      top: "conv5_6/sep"
      convolution_param {
        num_output: 1024
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv5_6/sep/bn"
      type: "BatchNorm"
      bottom: "conv5_6/sep"
      top: "conv5_6/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu5_6/sep"
      type: "ReLU"
      bottom: "conv5_6/sep"
      top: "conv5_6/sep"
    }
    layer {
      name: "conv6/dw"
      type: "Convolution"
      bottom: "conv5_6/sep"
      top: "conv6/dw"
      convolution_param {
        num_output: 1024
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 1024
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv6/dw/bn"
      type: "BatchNorm"
      bottom: "conv6/dw"
      top: "conv6/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu6/dw"
      type: "ReLU"
      bottom: "conv6/dw"
      top: "conv6/dw"
    }
    layer {
      name: "conv6/sep"
      type: "Convolution"
      bottom: "conv6/dw"
      top: "conv6/sep"
      convolution_param {
        num_output: 1024
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "conv6/sep/bn"
      type: "BatchNorm"
      bottom: "conv6/sep"
      top: "conv6/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu6/sep"
      type: "ReLU"
      bottom: "conv6/sep"
      top: "conv6/sep"
    }
    layer {
      name: "relu6/sep/conv_down"
      type: "Convolution"
      bottom: "conv6/sep"
      top: "relu6/sep/conv_down"
      convolution_param {
        num_output: 256
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "relu6/sep/conv_down/bn"
      type: "BatchNorm"
      bottom: "relu6/sep/conv_down"
      top: "relu6/sep/conv_down"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu6/sep/relu_down"
      type: "ReLU"
      bottom: "relu6/sep/conv_down"
      top: "relu6/sep/conv_down"
    }
    layer {
      name: "relu6/sep/relu_down/up2"
      type: "Deconvolution"
      bottom: "relu6/sep/conv_down"
      top: "relu6/sep/relu_down/up2"
      param {
        lr_mult: 0.0
        decay_mult: 0.0
      }
      convolution_param {
        num_output: 256
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 256
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }
    layer {
      name: "relu6/sep/relu_down/up2/up4"
      type: "Deconvolution"
      bottom: "relu6/sep/relu_down/up2"
      top: "relu6/sep/relu_down/up2/up4"
      param {
        lr_mult: 0.0
        decay_mult: 0.0
      }
      convolution_param {
        num_output: 256
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 256
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }
    layer {
      name: "relu6/sep/relu_down/up2/up4/up8"
      type: "Deconvolution"
      bottom: "relu6/sep/relu_down/up2/up4"
      top: "relu6/sep/relu_down/up2/up4/up8"
      param {
        lr_mult: 0.0
        decay_mult: 0.0
      }
      convolution_param {
        num_output: 256
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 256
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }
    layer {
      name: "relu3_1/sep/conv_shortcut"
      type: "Convolution"
      bottom: "conv3_1/sep"
      top: "relu3_1/sep/conv_shortcut"
      convolution_param {
        num_output: 64
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "relu3_1/sep/conv_shortcut/bn"
      type: "BatchNorm"
      bottom: "relu3_1/sep/conv_shortcut"
      top: "relu3_1/sep/conv_shortcut"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "relu3_1/sep/relu_shortcut"
      type: "ReLU"
      bottom: "relu3_1/sep/conv_shortcut"
      top: "relu3_1/sep/conv_shortcut"
    }
    layer {
      name: "cat_block"
      type: "Concat"
      bottom: "relu6/sep/relu_down/up2/up4/up8"
      bottom: "relu3_1/sep/conv_shortcut"
      top: "cat_block"
    }
    layer {
      name: "ctx_block1/dw"
      type: "Convolution"
      bottom: "cat_block"
      top: "ctx_block1/dw"
      convolution_param {
        num_output: 320
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 320
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "ctx_block1/dw/bn"
      type: "BatchNorm"
      bottom: "ctx_block1/dw"
      top: "ctx_block1/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "ctx_block1/dw/relu"
      type: "ReLU"
      bottom: "ctx_block1/dw"
      top: "ctx_block1/dw"
    }
    layer {
      name: "ctx_block1/sep"
      type: "Convolution"
      bottom: "ctx_block1/dw"
      top: "ctx_block1/sep"
      convolution_param {
        num_output: 320
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "ctx_block1/sep/bn"
      type: "BatchNorm"
      bottom: "ctx_block1/sep"
      top: "ctx_block1/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "ctx_block1/sep/relu"
      type: "ReLU"
      bottom: "ctx_block1/sep"
      top: "ctx_block1/sep"
    }
    layer {
      name: "ctx_block2/dw"
      type: "Convolution"
      bottom: "ctx_block1/sep"
      top: "ctx_block2/dw"
      convolution_param {
        num_output: 320
        bias_term: false
        pad: 1
        kernel_size: 3
        group: 320
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "ctx_block2/dw/bn"
      type: "BatchNorm"
      bottom: "ctx_block2/dw"
      top: "ctx_block2/dw"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "ctx_block2/dw/relu"
      type: "ReLU"
      bottom: "ctx_block2/dw"
      top: "ctx_block2/dw"
    }
    layer {
      name: "ctx_block2/sep"
      type: "Convolution"
      bottom: "ctx_block2/dw"
      top: "ctx_block2/sep"
      convolution_param {
        num_output: 320
        bias_term: false
        pad: 0
        kernel_size: 1
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        dilation: 1
      }
    }
    layer {
      name: "ctx_block2/sep/bn"
      type: "BatchNorm"
      bottom: "ctx_block2/sep"
      top: "ctx_block2/sep"
      batch_norm_param {
        scale_bias: true
      }
    }
    layer {
      name: "ctx_block2/sep/relu"
      type: "ReLU"
      bottom: "ctx_block2/sep"
      top: "ctx_block2/sep"
    }
    layer {
      name: "ctx_final"
      type: "Convolution"
      bottom: "ctx_block2/sep"
      top: "ctx_final"
      convolution_param {
        num_output: 19
        pad: 0
        kernel_size: 1
        weight_filler {
          type: "msra"
        }
      }
    }
    layer {
      name: "ctx_final/up16"
      type: "Deconvolution"
      bottom: "ctx_final"
      top: "ctx_final/up16"
      param {
        lr_mult: 0.0
        decay_mult: 0.0
      }
      convolution_param {
        num_output: 19
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 19
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }
    layer {
      name: "ctx_output"
      type: "Deconvolution"
      bottom: "ctx_final/up16"
      top: "ctx_output"
      param {
        lr_mult: 0.0
        decay_mult: 0.0
      }
      convolution_param {
        num_output: 19
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 19
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }
    layer {
      name: "loss"
      type: "SoftmaxWithLoss"
      bottom: "ctx_output"
      bottom: "label"
      top: "loss"
      propagate_down: true
      propagate_down: false
      loss_param {
        ignore_label: 255
        normalization: VALID
      }
    }
    layer {
      name: "accuracy/top1"
      type: "Accuracy"
      bottom: "ctx_output"
      bottom: "label"
      top: "accuracy/top1"
      include {
        phase: TEST
      }
      accuracy_param {
        ignore_label: 255
      }
    }
    layer {
      name: "accuracy/top5"
      type: "Accuracy"
      bottom: "ctx_output"
      bottom: "label"
      top: "accuracy/top5"
      include {
        phase: TEST
      }
      accuracy_param {
        top_k: 5
        ignore_label: 255
      }
    }
    
    

    • This is my import configuration file: "tidl_import_mobilesegnett1-1.0_mod.txt"

    modelType = 0
    numParamBits = 16
    numFeatureBits = 16
    inputNetFile = "../../test/testvecs/models/public/caffe/mod/mobilesegnett1-1.0/deploy.prototxt"
    inputParamsFile = "../../test/testvecs/models/public/caffe/mod/mobilesegnett1-1.0/multiod_mobilesegnett1-1.0_iter_420000.caffemodel"
    outputNetFile = "../../test/testvecs/config/tidl_models/caffe/tidl_net_mod_mobilesegnett1-1.0_320x320.bin"
    outputParamsFile = "../../test/testvecs/config/tidl_models/caffe/tidl_io_mod_mobilesegnett1-1.0_320x320_"
    inDataFormat = 0
    perfSimConfig = ../../test/testvecs/config/import/device_config.cfg
    inData = "../../test/testvecs/config/segmentation_list_mod.txt"
    postProcType = 3

    • This is my inference configuration file: "tidl_infer_mobilesegnett1-1.0_mod.txt"

    inFileFormat= 2
    postProcType = 3
    netBinFile = "testvecs/config/tidl_models/caffe/tidl_net_mod_mobilesegnett1-1.0_320x320.bin"
    ioConfigFile = "testvecs/config/tidl_models/caffe/tidl_io_mod_mobilesegnett1-1.0_320x320_1.bin"
    outData = "testvecs/output/mod_mobilesegnett1-1.0_320x320.bin"
    inData = "testvecs/config/segmentation_list_mod.txt"
    numFrames = 1
    totNumClasses = 20
    debugTraceLevel = 0
    writeTraceLevel = 0

    • I just updated to version( tidl_j7_08_01_00_05) , failed to use "pc_dSP_test_dl_algo.out" for imported model inference:

    Error at line: 741 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_08_01_00_05/ti_dl/test/src/pc_linux/../tidl_tb_utils.c, of function : tidl_tb_dataConvert
    Error at line: 741 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_08_01_00_05/ti_dl/test/src/pc_linux/../tidl_tb_utils.c, of function : tidl_tb_dataConvert
    Error at line: 741 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_08_01_00_05/ti_dl/test/src/pc_linux/../tidl_tb_utils.c, of function : tidl_tb_dataConvert
    Error at line: 741 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_08_01_00_05/ti_dl/test/src/pc_linux/../tidl_tb_utils.c, of function : tidl_tb_dataConvert
    Error at line: 741 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_08_01_00_05/ti_dl/test/src/pc_linux/../tidl_tb_utils.c, of function : tidl_tb_dataConvert

    Regards,

    Damon

  • By "Device" I mean the TDA4V (EVM).

    For a new version you need to import the model again, did you import the model with the new version of the tools again?

  • Hi kumar:

    This error occurred when I re-imported the model on the new version 8.01. 

    My recently retrained model, imported and inferred on version 7.3. Inference  test error:  

    Error at line: 483 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_02_00_00_07/ti_dl/test/src/pc_linux/../tidl_rt.c, of function : tidl_copyRTTensorToInBufs
    Error at line: 483 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_02_00_00_07/ti_dl/test/src/pc_linux/../tidl_rt.c, of function : tidl_copyRTTensorToInBufs
    Error at line: 483 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_02_00_00_07/ti_dl/test/src/pc_linux/../tidl_rt.c, of function : tidl_copyRTTensorToInBufs
    Error at line: 483 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_02_00_00_07/ti_dl/test/src/pc_linux/../tidl_rt.c, of function : tidl_copyRTTensorToInBufs

    Import and inferred on version 8.01Inference  test error:  

    Error at line: 741 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_08_01_00_05/ti_dl/test/src/pc_linux/../tidl_tb_utils.c, of function : tidl_tb_dataConvert
    Error at line: 741 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_08_01_00_05/ti_dl/test/src/pc_linux/../tidl_tb_utils.c, of function : tidl_tb_dataConvert
    Error at line: 741 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_08_01_00_05/ti_dl/test/src/pc_linux/../tidl_tb_utils.c, of function : tidl_tb_dataConvert
    Error at line: 741 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_08_01_00_05/ti_dl/test/src/pc_linux/../tidl_tb_utils.c, of function : tidl_tb_dataConvert
    Error at line: 741 : in file /opt/Jenkins_OUT/workspace/J7_TIDL_Parent/c7x-mma-tidl/ti_dl/release/tidl_j7_08_01_00_05/ti_dl/test/src/pc_linux/../tidl_tb_utils.c, of function : tidl_tb_dataConvert

    • None of the above model imports reported any errors.

    Regards,

    Damon

  • It's not my job to import models to run on TDA4(EVM), so I don't know much about it.  

    If neither the imported model nor the inference tests report any errors, will the imported model work in TDA4?  

  • Could you please share the complete steps and collaterals (Model, config files) to re-produce this issue?

    BTW, We have Python API-based import support with open source runtimes Like TFlite / ONNX runtime. Would consider this for import and validation?

    github.com/.../edgeai-tidl-tools