Skip to content

images_batch error message #13

@nguaki

Description

@nguaki

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])]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions