tensorrt-utils
tensorrt-utils copied to clipboard
Vague error.
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)