Skip to content

Commit

Permalink
fix bug for trt inference
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenZYJ committed Oct 8, 2023
1 parent dd9e338 commit 19c8663
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit 19c8663

Please sign in to comment.