Platform details:
linux18.04 LTS
GPU: GTX1070
nvidia driver:390.77
cuda: 9.0
cudnn: 9.0-v7.4
tensorflow: 1.12.0
tensorrt: 5.0
Dear everyone,
I am trying to transform my tensorflow model to tensorRT model.
The ‘conv2D’ is in my layers. And it is behind the ‘concat’ layer.
When I use the code as below to register my input.
parser->registerInput("Input", DimsNCHW(1, 3, 256, 256), UffInputOrder::kNCHW);
It returns some error.
ERROR: UFFParser: Parser error: g_net/enc1_1/Conv2D: Order size is not matching the number dimensions of TensorRT
So I modify the input.
parser->registerInput("Input", DimsCHW(3, 256, 256), UffInputOrder::kNCHW);
It returns some error.
ERROR: g_net/enc1_1/Conv2D: kernel weights has count 4800 but 102400 was expected
The correct weights size is 5 x 5 x 64 x 6 = 4800. And 102400 can be get by 5 x 5 x 64 x 64. And 64 is the width of the previous layer’s output tensor. I tested much and got the same result.
I also wrote a custom plugin to replace for the ‘concat’. When I modify the output format to HWC, it can be parsed successfully.
Thanks.