import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.preprocessing import image_dataset_from_directory
training_set = image_dataset_from_directory(train_dir,
shuffle=True,
batch_size=32,
image_size=(150, 150))
val_dataset = image_dataset_from_directory(validation_dir,
shuffle=True,
batch_size=32,
image_size=(150, 150))