Uffparser error for deconvolution in conv2d_transpose

[TensorRT] INFO: UFFParser: Deconvolution: tweaking padding to have the correct shape
python: uff/UffParser.cpp:936: std::shared_ptr UffParser::parseConvTranspose(const uff::Node&, const Fields&, NodesMap&): Assertion `outSpatial[0] == layer->getOutput(0)->getDimensions().d[1]’ failed.

Does anyone know how to deal with this error?

Using TensorRT 4.0.1.6 to convert tf model (tf version = 1.5.1) to trt engine with Python API.

Hello JF_brt,

Hello, can you provide details on the platforms you are using?

Linux distro and version
GPU type
nvidia driver version
CUDA version
CUDNN version
Python version [if using python]
Tensorflow version
TensorRT version

What type of tf model/layers are you converting?

Any usage/source file or pd you can provide will help us debug too.

Sure!

Linux distro and version ubuntu 16.04
GPU type 1080Ti
nvidia driver version 390.87
CUDA version 9.0
CUDNN version 7.1.3
Python version [if using python] 2.7
Tensorflow version 1.5.1 (but was built from source with CUDA 8.0 and cudnn 6.0.21)
TensorRT version 4.0.1.6

I’m currently creating the model with tf 1.8.0 with CUDA 9.0 and cudnn 7.1.3 to see if this problem goes away.

What type of tf model/layers are you converting? conv2d_transpose

Unfortunately no luck with tf 1.8.0 either.

Does TensorRT 4.0.1.6 support StridedSlice op? If not, what is the supported upconv method in TensorRT? (Other upconv methods such as dilated conv2d and bilinear + conv2d have unsupported ops, i.e. SpaceToBatchND and ResizeNearestNeighbor)

Please advice. Thanks!

Got it to work after modifying one of the layer from stride 4 to 2 stride 2.

There maybe a bug in the deconvolution padding.
The dimension seems to mismatch if stride 4 is used.

Hi JF_brt,

glad you got it to work.

TRT4 supports deconv (just another name for upconv), but do not support dilated deconv. TRT4 supports dilated conv2d. TRT4 do not support upsampling of any kind (nearest neighbor or bilinear).