application_vnd.jupyter.stderr_output_1.png
from keras.models import Model, load_model

from tensorflow.keras.applications.resnet50 import ResNet50

from tensorflow.keras.models import Model

import tensorflow as tf

data_dir = '/kaggle/input/rgb-arabic-alphabets-sign-language-dataset-jpg/images_after'
images = tf.keras.utils.image_dataset_from_directory(data_dir, labels='inferred', label_mode='int', class_names=None, color_mode='rgb', batch_size=32, image_size=(256, 256), shuffle=True, seed=123, validation_split=0.2, subset='training', interpolation='bilinear')

data_dir = '/kaggle/input/rgb-arabic-alphabets-sign-language-dataset-jpg/images_after'
images_validation = tf.keras.utils.image_dataset_from_directory(data_dir, labels='inferred', label_mode='int', class_names=None, color_mode='rgb', batch_size=32, image_size=(256, 256), shuffle=True, seed=123, validation_split=0.2, subset='validation', interpolation='bilinear')

early_stop = tf.keras.callbacks.EarlyStopping(monitor='val_loss', patience=2, restore_best_weights=True)

from tensorflow.keras.applications.resnet50 import ResNet50
from tensorflow.keras.models import Model
import tensorflow.keras as keras
resnet = ResNet50(include_top=False, weights='imagenet', input_shape=(256, 256, 3), pooling='max')
output = resnet.layers[-1].output
output = tf.keras.layers.Flatten()(output)
resnet = Model(resnet.input, output)
res_name = []
for layer in resnet.layers:
    res_name.append(layer.name)