text_plain_output_1.png
from tensorflow.keras.preprocessing.image import ImageDataGenerator

BASE_PATH = '/kaggle/input/histopathologic-cancer-detection'
BASE_TRAIN_PATH = f'{BASE_PATH}/train'
BASE_TEST_PATH = f'{BASE_PATH}/test'
BASE_TRAIN_LABELS_PATH = '/kaggle/input/dataset-copy/new_dataset/train_labels.csv'
BASE_TEST_TRAIN_PATH = f'/kaggle/input/dataset-copy/new_dataset/train'
BASE_TEST_TRAIN_10000_PATH = f'{BASE_TEST_TRAIN_PATH}/10000'
BASE_TEST_TRAIN_50000_PATH = f'{BASE_TEST_TRAIN_PATH}/150000'
BASE_TEST_TRAIN_ALL_PATH = f'{BASE_TEST_TRAIN_PATH}/all'
SYMBOLINK_PATH = '/kaggle/working'
SYMBOLINK_TRAIN_PATH = f'{SYMBOLINK_PATH}/train'
SYMBOLINK_SMALLER_TRAIN_PATH = f'{SYMBOLINK_PATH}/smaller_train'

from tensorflow.keras.preprocessing import image_dataset_from_directory
from tensorflow.keras.preprocessing.image import ImageDataGenerator
datagen = ImageDataGenerator(rescale=1.0 / 255)
train_gen = datagen.flow_from_directory(BASE_TEST_TRAIN_10000_PATH, target_size=(96, 96), batch_size=32, class_mode='binary')