Last active
July 8, 2021 13:56
-
-
Save um4ng-tiw/fd2e1ea5333895a0167067574a8dd374 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
x,y = test_data_generator.next() | |
pred_array=[] | |
max_index_arr = [] | |
for i in range(10): | |
img = x[i] | |
img = img.reshape(-1,64,64,3) | |
pred_val = model.predict(img) | |
max_idx = np.argmax(pred_val) | |
pred_array.append(max_idx) | |
cell_dict = {0:"EOSINOPHIL", 1:"LYMPHOCYTE", 2:"MONOCYTE", 3:"NEUTROPHIL"} | |
predictions = {} | |
actual_val = {} | |
k=0 | |
for arr in y[:10]: | |
actual_val[k] = cell_dict[np.argmax(arr)] | |
k+=1 | |
k=0 | |
for pred in pred_array: | |
predictions[k] = cell_dict[pred] | |
k+=1 | |
print("ACTUAL:", actual_val) | |
print("\nPREDICTIONS:", predictions) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment