Browse Source

Added top_k

master
Samuel ORTION 1 year ago
parent
commit
0bed68679a
  1. 2
      src/run_tf_lite_classify_bird_pict.py

2
src/run_tf_lite_classify_bird_pict.py

@ -18,7 +18,7 @@ def set_input_tensor(interpreter, image):
input_tensor = interpreter.tensor(tensor_index)()[0]
input_tensor[:, :] = image
def classify_image(interpreter, image):
def classify_image(interpreter, image, top_k=1):
"""Returns a sorted array of classification results."""
set_input_tensor(interpreter, image)
interpreter.invoke()

Loading…
Cancel
Save