Skip to content

Instantly share code, notes, and snippets.

@um4ng-tiw
Created July 13, 2021 06:03
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 um4ng-tiw/f6672277d9fefbd45feb0c4fcb5d8029 to your computer and use it in GitHub Desktop.
Save um4ng-tiw/f6672277d9fefbd45feb0c4fcb5d8029 to your computer and use it in GitHub Desktop.
datagen = ImageDataGenerator(rescale = 1/255.0, validation_split = 0.1)
train_data_generator = datagen.flow_from_directory(directory="Lung_cancer_dataset/Train", target_size = (img_width, img_height), color_mode="grayscale", class_mode="categorical", batch_size = 16, subset = "training", shuffle="True")
validation_data_generator = datagen.flow_from_directory(directory="Lung_cancer_dataset/Train", target_size = (img_width, img_height),color_mode="grayscale", class_mode="categorical", batch_size = 16,subset = "validation")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment