TensorRT 4.0 uff file run problem

Hi,

I have problems in using the tensorRT.

first, my pc env’ is followings

  • Linux distro and version : Ubuntu 16.04.5 LTS
  • GPU type & Driver Version
    ** Driver Version: 396.26
    ** 0: TITAN X (Pascal) 12194MiB
    ** 1: TITAN Xp 12196MiB
  • CUDA version : release 9.0, V9.0.176
  • CUDNN version : CUDNN_MAJOR 7 CUDNN_MINOR 2 CUDNN_PATCHLEVEL 1
  • Python version : Python 3.5.2
  • Tensorflow version : tensorflow-gpu 1.12.0
  • TensorRT version : 4.0.1.6
  • nvidia docker : nvcr.io/nvidia/tensorrt:18.08-py3

Describe the problem
for converting to uff and run inference on my trained-model
the train model is ‘ssd_resnet_v1_fpn’ in ‘https://github.com/tensorflow/models/tree/master/research/object_detection
I have refer to ‘/workspace/tensorrt/samples/sampleUffSSD/README.txt’ in nvidia-docker
*line 10 : Steps to generate UFF file --> It’s OK
From /workspace/tensorrt/bin#
./sample_uff_ssd
-----------------error-result----------------------------------
…/data/ssd/sample_ssd.uff
Begin parsing model…
ERROR: UFFParser: Validator error: MultiscaleGridAnchorGenerator/ToNormalizedCoordinates_4/Cast_1: Unsupported operation _Cast
ERROR: sample_uff_ssd: Fail to parse
sample_uff_ssd: sampleUffSSD.cpp:667: int main(int, char
): Assertion `tmpEngine != nullptr’ failed.
Aborted (core dumped)

How can I fix or run my uff file ?

Hello,
It looks like the model you are converting to TensorRT contains an unsupported operation “_Cast”.
For a list of supported operations, please reference: https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#support_op

For unsupported layers, users can extend TensorRT functionalities by implementing custom layers using the IPluginV2 class for the C++ and Python API. Custom layers, often referred to as plugins, are implemented and instantiated by an application, and their lifetime must span their use within a TensorRT engine. https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#extending

regards,
NVIDIA Enterprise Support

hey,
were you able to solve the problem of unsupported cast operation. if yes, could you share it or direct me how to create such plugin.