Skip to content

Commit

Permalink
*.torchscript inference self.jit fix (ultralytics#6007)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Dec 16, 2021
1 parent c0aa3e7 commit aa326b3
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 @@ -379,7 +379,7 @@ def wrap_frozen_graph(gd, inputs, outputs):
def forward(self, im, augment=False, visualize=False, val=False):
# YOLOv5 MultiBackend inference
b, ch, h, w = im.shape # batch, channel, height, width
if self.pt: # PyTorch
if self.pt or self.jit: # PyTorch
y = self.model(im) if self.jit else self.model(im, augment=augment, visualize=visualize)
return y if val else y[0]
elif self.coreml: # CoreML
Expand Down

0 comments on commit aa326b3

Please sign in to comment.