Skip to content

Commit

Permalink
Add macos-latest runner for CoreML benchmarks (#9453)
Browse files Browse the repository at this point in the history
* Add `macos-latest` runner for CoreML benchmarks

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update common.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update ci-testing.yml

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
glenn-jocher authored Sep 17, 2022
1 parent afb9860 commit e8a9c5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,7 @@ def forward(self, im, augment=False, visualize=False):
conf, cls = y['confidence'].max(1), y['confidence'].argmax(1).astype(np.float)
y = np.concatenate((box, conf.reshape(-1, 1), cls.reshape(-1, 1)), 1)
else:
k = 'var_' + str(sorted(int(k.replace('var_', '')) for k in y)[-1]) # output key
y = y[k] # output
y = list(reversed(y.values())) # reversed for segmentation models (pred, proto)
elif self.paddle: # PaddlePaddle
im = im.cpu().numpy().astype(np.float32)
self.input_handle.copy_from_cpu(im)
Expand Down

0 comments on commit e8a9c5a

Please sign in to comment.