Error on this notebook:
potato-disease-classification-model-using-image-data-generator.ipynb
The line:
batch_prediction = model.predict(images_batch)
Getting an error on this line.
images_batch was never defined (misspelling?).
That cell has to be removed.
If you want to keep it alive, need following lines:
first_image = image_batch[0]
first_label = np.argmax(label_batch[0])
plt.imshow(first_image)
img_array = tf.keras.preprocessing.image.img_to_array(first_image)
img_array = tf.expand_dims(img_array, 0)
predictions = model.predict(img_array)
predicted_class = class_names[np.argmax(predictions[0])]
Error on this notebook:
potato-disease-classification-model-using-image-data-generator.ipynb
The line:
batch_prediction = model.predict(images_batch)
Getting an error on this line.
images_batch was never defined (misspelling?).
That cell has to be removed.
If you want to keep it alive, need following lines:
first_image = image_batch[0]
first_label = np.argmax(label_batch[0])
plt.imshow(first_image)
img_array = tf.keras.preprocessing.image.img_to_array(first_image)
img_array = tf.expand_dims(img_array, 0)
predictions = model.predict(img_array)
predicted_class = class_names[np.argmax(predictions[0])]