Created
May 27, 2019 19:53
-
-
Save frogermcs/46e3747a9279760234ace93f6bbe5c37 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
# Get images and labels batch from validation dataset generator | |
val_image_batch, val_label_batch = next(iter(valid_generator)) | |
true_label_ids = np.argmax(val_label_batch, axis=-1) | |
print("Validation batch shape:", val_image_batch.shape) | |
# >> Validation batch shape: (32, 224, 224, 3) | |
# Get predictions for images batch | |
tf_model_predictions = flowers_model.predict(val_image_batch) | |
print("Prediction results shape:", tf_model_predictions.shape) | |
# >> Prediction results shape: (32, 5) | |
# Convert prediction results to Pandas dataframe, for better visualization | |
tf_pred_dataframe = pd.DataFrame(tf_model_predictions) | |
tf_pred_dataframe.columns = dataset_labels |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment