Skip to content

Instantly share code, notes, and snippets.

@mohdsanadzakirizvi
Created February 6, 2020 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohdsanadzakirizvi/a58262c2bde874795a8cb96a568cdc92 to your computer and use it in GitHub Desktop.
Save mohdsanadzakirizvi/a58262c2bde874795a8cb96a568cdc92 to your computer and use it in GitHub Desktop.
from keras.preprocessing.image import ImageDataGenerator
# create a new generator
imagegen = ImageDataGenerator()
# load train data
train = imagegen.flow_from_directory("imagenette2/train/", class_mode="categorical", shuffle=False, batch_size=128, target_size=(224, 224))
# load val data
val = imagegen.flow_from_directory("imagenette2/val/", class_mode="categorical", shuffle=False, batch_size=128, target_size=(224, 224))
@Prashannakhanal
Copy link

can you provide the code for testing accuracy of the model as i have used imagedatagenerator
i m confused about validation data
.isnt it the test data . but u have used it as validation data . and after training the model u need to test the model model and what data will u used to test it as u have already usedd the test data as validation data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment