Convert UFF to TensorRT with multiple outputs

I know uff to tensorrt is not recommended.
But I am trying to make my old program to work in TensorRT.

My tensorflow model is two outputs (pafmat an heatmat) as shown in the attached image.

.

I have converted to UFF file as follows.

import tensorrt
import tensorflow
import os
import uff
output_names = [“pafmat”,“heatmat”]
uff.from_tensorflow(graphdef=“cmu/working_model/cmu_model.pb”, output_filename=“cmu/working_model/cmu_openpose.uff”, output_nodes=output_names)

Now I am trying to produce TensorRT engine.
How can I have two outputs at TensorRT conversion?
If I put two

parser.register_output(“heatmat”,“pafmat”)#

I have error as

<tensorrt.tensorrt.UffParser object at 0x7f7c40130298>, {‘heatmat’, ‘pafmat’}

Is it possible to have two outputs at TensorRT engine conversion?

Hi, UFF and Caffe Parser have been deprecated from TensorRT 7 onwards, hence request you to try ONNX parser.

Please check the below link for the same.

Thanks!