CoreML inference fix `list()` -> `sorted()` (#6496)
parent
5e4ff195b2
commit
77977e0791
|
@ -427,7 +427,7 @@ class DetectMultiBackend(nn.Module):
|
|||
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:
|
||||
y = y[list(y)[-1]] # last output
|
||||
y = y[sorted(y)[-1]] # last output
|
||||
else: # TensorFlow (SavedModel, GraphDef, Lite, Edge TPU)
|
||||
im = im.permute(0, 2, 3, 1).cpu().numpy() # torch BCHW to numpy BHWC shape(1,320,192,3)
|
||||
if self.saved_model: # SavedModel
|
||||
|
|
Loading…
Reference in New Issue