How to set layer name when convert a ONNX model to TensorRT plan file

I have a PyTorch model and I want to refit some layers at runtime. I have set layer names when exporting the PyTorch model to ONNX format. However, I failed to refit layers. It seems that the layer names are never set when ONNXParser parse the ONNX file.

Is there any option to force ONNXParser set layer names according to ONNX names? I know I can set all layer names manually after ONNXParser.parse called.


Could you share more information with us?

What is the expected name and observed name of the refit layers?
More, could you share a simple reproducible source so we can check it directly?