Trying to build a TensorRT engine for a custom network. I am able to create an uff file from the frozen graph. However the uff_to_trt_engine call fails with a very ambiguous error:
AssertionError: UFF parsing failed on line 186 in statement assert(parser_result)
Considering I was able to build the uff file, what might be the reason it then fails to build the engine? The relevant code:
tf_path = '/home/mmibm/networks/predict_frozen_graph.pb'
uff_model = uff.from_tensorflow_frozen_model(tf_path, ["energy_estimator/e_upscore_1/conv2d_transpose"], text=True,
output_filename='/home/mmibm/tensorrt_networks/model.uff')
G_LOGGER = trt.infer.ConsoleLogger(trt.infer.LogSeverity.ERROR)
parser = trt.parsers.uffparser.create_uff_parser()
parser.register_input("image_input", (3, 384, 512), 0)
parser.register_output("energy_estimator/e_upscore_1/conv2d_transpose")
engine = trt.utils.uff_to_trt_engine(G_LOGGER, uff_model, parser, 1, 1 << 30, trt.infer.DataType.FLOAT)
You can find the uff file here:
https://drive.google.com/open?id=12aUfR6joDASFLAD5jfVj15u7uK49atyE