Padding error when creating TensorRT Plan

I get the following error when I run my trained networks’ UFF file to make a plan file:

Step 3/5: Parsing UFF Model…
UFFParser: parsing input/IteratorGetNext
UFFParser: parsing reshape/Reshape/shape
UFFParser: parsing reshape/Reshape
UFFParser: parsing reshape/transpose
UFFParser: parsing layer3/kernel/Variable
UFFParser: parsing layer3/Conv2D
UFFParser: parsing layer3/bias/Variable
UFFParser: parsing layer3/BiasAdd
UFFParser: parsing layer3/Relu
UFFParser: parsing layer3/MaxPool
UFFParser: parsing layer3/Reshape/shape
UFFParser: parsing layer3/Reshape

make_trt_plan: Network.h:103: virtual nvinfer1::DimsHW nvinfer1::NetworkDefaultConvolutionFormula::compute(nvinfer1::DimsHW, nvinfer1::DimsHW, nvinfer1::DimsHW, nvinfer1::DimsHW, nvinfer1::DimsHW, const char*): Assertion `(input.h() + padding.h() * 2) >= dkh && “Image height with padding must always be at least the height of the dilated filter.”’ failed.

Here is the layer in question:

with tf.name_scope('layer3'):
    w = tf.Variable(tf.truncated_normal([l1, l2, l3, l4], stddev=0.1, name='weights'))
    b = tf.Variable(tf.constant(0.0, shape=[l4], name='biases'))
    conv1 = tf.nn.relu(tf.nn.bias_add(tf.nn.conv2d(x_reshape, w, strides=[1, 1, 1, 1], padding='VALID'), b))
    pool1 = tf.nn.max_pool(conv1, ksize=[1, l5, l6, 1], strides=[1, l5, l6, 1], padding='VALID')
    pool1_flat =tf.reshape(pool1, [-1,[-3:])])

I tested it on my x86 machine and the plan file is able to be created and works like a charm. When I create it on the Jetson, I get that error.

Any help is appreciated!


PLAN has some dependencies on GPU architecture.

You need to make the PLAN on TX2 directly.
PLAN created on other GPU architecture will crash due to different GPU layout.


Hi @AastaLL,

Sorry if I was unclear.

I get the above error when I create the PLAN on the TX2 directly.

I do not get the error when I create the PLAN on my x86.


This issue looks related to the tensor dimension.

Could you share the value of these parameters: l1, l2, l3, l4, l5, l6
And the dimension of x_reshape with us?