TensorRT stridedslice: wrong output order

Hi @derekwong6666,

Similar to your other post here: TensorRT strideslice: StridedSlice does not support axis shrinking unless with Constant input node for now - #2 by NVES_R, I recommend trying the ONNX parser instead.

However, to answer your question, you could try playing with the UFF parser’s input order argument here to see if that gives you the results you expect: UFF Parser — NVIDIA TensorRT Standard Python API Documentation 8.4.3 documentation

Example:

parser.register_input(input_name, input_shape, trt.UffInputOrder.NHWC)
# or
parser.register_input(input_name, input_shape, trt.UffInputOrder.NCHW)

Either way, TensorRT adds in transpose ops to make the network run in NCHW order for performance reasons.