Pad layer only works in one dimension in TensorRT5

Consider the following tensorflow code:

placeholder_tensor =  tf.placeholder(dtype=tf.float32, shape=(1, 361, 641, 3))
image_tensor_tensor = padmap(placeholder_tensor, 3 )

def padmap(x, size):
    paddings = tf.constant([[0, 0], ,
                                  , [0, 0]])
    x = tf.pad(x, paddings, "CONSTANT")
    return x

The expected output is a padded tensor
<tf.Tensor ‘Pad:0’ shape=(1, 367, 647, 3) dtype=float32>

TensoRT issue
i converted this code via uff and now in tensorrt ouptut size is as below

Placeholder x1x361x641x3
Pad x1x361x647x3

its padded only in one direction

But Tensorrt document clearly says following-

Conditions And Limitations
‣ A must have three dimensions or more.
‣ The padding can only be applied along the two innermost dimensions.
‣ Only zero-padding is supported.

Configurations: Windows, TensorRT

I wish you’d get an official reply, but if I’d hazard a guess it’s probably because “The padding can only be applied along the two innermost dimensions” and the fact that you’re applying padding on the 3rd-last and 2nd-last dims instead.