Skip to content

Instantly share code, notes, and snippets.

@AyishaR
Created April 10, 2021 16:23
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 AyishaR/8e5005bc684eaa9890e8fe7290cc9552 to your computer and use it in GitHub Desktop.
Save AyishaR/8e5005bc684eaa9890e8fe7290cc9552 to your computer and use it in GitHub Desktop.
# Loading the dataset
path = 'surface'
batch_size = 256
train_df = preprocessing.image_dataset_from_directory(path, label_mode = 'binary', validation_split = 0.2, seed = 113, subset='training', batch_size = batch_size)
test_df = preprocessing.image_dataset_from_directory(path, label_mode = 'binary', validation_split = 0.2, seed = 113, subset='validation', batch_size = batch_size)
# Looking into the class labels
class_names = train_df.class_names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment