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 5.0.4.3 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 5.0.4.3