From 19c8663c8a5c1ec40e4709c739127fc5158ed673 Mon Sep 17 00:00:00 2001 From: edge Date: Sun, 8 Oct 2023 20:13:51 +0800 Subject: [PATCH] fix bug for trt inference --- models/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/common.py b/models/common.py index 75cc4e97bbc7..c368e1277b55 100644 --- a/models/common.py +++ b/models/common.py @@ -549,7 +549,7 @@ def forward(self, im, augment=False, visualize=False): assert im.shape == s, f"input size {im.shape} {'>' if self.dynamic else 'not equal to'} max model size {s}" self.binding_addrs['images'] = int(im.data_ptr()) self.context.execute_v2(list(self.binding_addrs.values())) - y = [self.bindings[x].data for x in sorted(self.output_names)] + y = [self.bindings[x].data for x in ['output','462']] elif self.coreml: # CoreML im = im.cpu().numpy() im = Image.fromarray((im[0] * 255).astype('uint8'))