-
-
Save tanmay1070/ffab269998fee5e73918a5a76c25a4f1 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
for images, labels in val_data.take(1): | |
for i in range(6): | |
print("True_class:",val_data.class_names[labels[i]]) | |
x = image.img_to_array(images[i]) | |
x = np.expand_dims(x, axis=0) | |
p=np.argmax(model.predict(x)) | |
if p==0: | |
print("Predicted Image: Electric Bus") | |
else: | |
print("Predicted Image: Electric Car") | |
Output: | |
True_class: ELectric Bus | |
Predicted Image: Electric Bus | |
Predicted class: 0 | |
True_class: ELectric Bus | |
Predicted Image: Electric Bus | |
Predicted class: 0 | |
True_class: Electric Car | |
Predicted Image: Electric Car | |
Predicted class: 1 | |
True_class: ELectric Bus | |
Predicted Image: Electric Bus | |
Predicted class: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment