Machine Learning with Python Projects - Cat and Dog Image Classifier

Tell us what’s happening:
Describe your issue in detail here.

Your code so far
train_image_generator = ImageDataGenerator(rescale=1./255)

validation_image_generator = ImageDataGenerator(rescale=1./255)

test_image_generator = ImageDataGenerator(rescale=1./255)

train_data_gen = train_image_generator.flow_from_directory(train_dir, target_size=(IMG_HEIGHT, IMG_WIDTH), batch_size=batch_size, color_mode=‘rgb’, class_mode=‘binary’)

val_data_gen = validation_image_generator.flow_from_directory(validation_dir, target_size=(IMG_HEIGHT, IMG_WIDTH), batch_size=batch_size, color_mode=‘rgb’, class_mode=‘binary’)

test_data_gen = test_image_generator.flow_from_directory(test_dir, shuffle=False, target_size=(IMG_HEIGHT, IMG_WIDTH), batch_size=batch_size, color_mode=‘rgb’, class_mode=‘binary’)

Your browser information:
i am getting the output
Found 2000 images belonging to 2 classes.
Found 1000 images belonging to 2 classes.
Found 0 images belonging to 0 classes.

can someone help me??
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.76

Challenge: Machine Learning with Python Projects - Cat and Dog Image Classifier

Link to the challenge:

Search the forums and you’ll see similar issues solved. You’re giving the wrong path to flow_from_directory() and you’ll need to examine the path to the test data directory and look at the documentation for flow_from_directory() to learn how to fix the problem.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.