TensorRT C++ result was wired and changed everytime I do the same inference

Thanks for the reply. Actually I have gave the trtexec “-verbose” log in the link below and no further replies: TensorRT inference process.
Due to this project is owned by the company so I am not able to share the model or the code. But I can give some details about code.

The code was referring to the github:
GitHub - zbw4034/TensorRT-googlenet-opencv: use opencv to read .jpg and accelerate using tensorrt,
where my input is a (256,330,1) gray image, and the model will do the object detection on the image. The output is a (256,330,13) tensor, where 13 means 13 class channels (if this image belongs to class 2 for example, then only channel 2 will have the mask image and other channels will be empty).
And the post-processing stage will extract the correct channel out and display the mask on the original image.
I have changed original code to fit my input and also reformat the output from [256x330x13] float array to Mat. But the problem still exists as I have mentioned in the description(changed everytime I ran the code).
I can ensure that my tensorRT engine works fine in python and gave correct output when I ran.
But works poorly in C++.