Created
May 27, 2019 21:30
-
-
Save frogermcs/ab75f6d8f56c967d4ddb2057a4604693 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set batch of images into input tensor | |
tflite_interpreter.set_tensor(input_details[0]['index'], val_image_batch) | |
# Run inference | |
tflite_interpreter.invoke() | |
# Get prediction results | |
tflite_model_predictions = tflite_interpreter.get_tensor(output_details[0]['index']) | |
print("Prediction results shape:", tflite_model_predictions.shape) | |
# >> Prediction results shape: (32, 5) | |
# Convert prediction results to Pandas dataframe, for better visualization | |
tflite_pred_dataframe = pd.DataFrame(tflite_model_predictions) | |
tflite_pred_dataframe.columns = dataset_labels |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment