tensorrt-utils icon indicating copy to clipboard operation
tensorrt-utils copied to clipboard

Vague error.

Open Abdelrahman350 opened this issue 2 years ago • 0 comments

Hello, I am trying to run an onnex model using tensorrt backend, but I get the following error. KeyError: 'output1_before_shuffle'

model = onnx.load(args.files)
onnx.checker.check_model(model)
input_shapes = [[d.dim_value for d in _input.type.tensor_type.shape.dim] for _input in model.graph.input]
print(input_shapes)
shape = np.ravel(input_shapes)
engine = backend.prepare(model, device='CUDA:0')
input_data = np.random.random(size=(20, shape[1], shape[2], shape[3])).astype(np.float32)
output_data = engine.run(input_data)

Abdelrahman350 avatar Mar 21 '22 15:03 Abdelrahman350