logo
Browse Source

add omnivore

Signed-off-by: gexy5 <xinyu.ge@zilliz.com>
main
gexy5 2 years ago
parent
commit
0cbee7828e
  1. 4
      omnivore.py

4
omnivore.py

@ -105,5 +105,5 @@ class Omnivore(NNOperator):
pred_scores, pred_classes = preds.topk(k=self.topk) pred_scores, pred_classes = preds.topk(k=self.topk)
labels = [self.classmap[int(i)] for i in pred_classes[0]] labels = [self.classmap[int(i)] for i in pred_classes[0]]
scores = [round(float(x), 5) for x in pred_scores[0]] scores = [round(float(x), 5) for x in pred_scores[0]]
return labels, scores, features
print(labels,scores)
return labels, scores

Loading…
Cancel
Save