Skip to content

Quick question #183

Answered by gauravreddy08
JoshK68 asked this question in Q&A
Sep 9, 2021 · 4 comments · 4 replies
Discussion options

You must be logged in to vote

Hey @JoshK68,

Use the image_dataset_from_directory function instead, it does the same job !!

So, replace your code :

train_datagen = ImageDataGenerator(rescale = 1./255)
valid_datagen = ImageDataGenerator(rescale=1./255)


train_data = train_datagen.flow_from_directory(train_dir,
                                               batch_size=32,
                                               target_size=(224,224),
                                               class_mode='binary',
                                               seed=42)

valid_data = valid_datagen.flow_from_directory(test_dir,
                                               batch_size=32,
                                        …

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@JoshK68
Comment options

Answer selected by JoshK68
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@JoshK68
Comment options

@gauravreddy08
Comment options

@JoshK68
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants