Output shape mismatch after convert pb to plan

I convert tensorflow pb model to tensorrt plan model, and I find the output shape of pb model([1,4]) mismatch the converted tensorrt plan model([1,1,1,4]). I am not sure which step will expand the dims. The convert step show below:

  1. Use the command "convert-to-uff ***.pb " to obtain ***.uff.
  2. Use the tensorrt C++ function “loadModelAndCreateEngine()” to generate ***.plan stream.

I can see the output shape of plan is [1,1,1,4], but not sure which step convert [1,4] to [1,1,1,4].

Please help me. Thanks


Could you please provide details on the platforms you are using:
o Linux distro and version
o GPU type
o Nvidia driver version
o CUDA version
o CUDNN version
o Python version [if using python]
o Tensorflow and PyTorch version
o TensorRT version
If possible, please share the script & model file to reproduce the issue along with error info.