text_plain_output_5.png text_plain_output_4.png text_plain_output_6.png text_plain_output_3.png text_plain_output_2.png text_plain_output_1.png
from tensorflow.keras.applications import EfficientNetB0

from tensorflow.keras.layers import Input, GlobalAveragePooling2D, Dense, Dropout

from tensorflow.keras.layers.experimental import preprocessing

from tensorflow.keras.metrics import AUC

from tensorflow.keras.models import Model

from tensorflow.keras.models import Sequential

from tensorflow.keras.layers.experimental import preprocessing
from tensorflow.keras.models import Sequential
img_augmentation = Sequential([preprocessing.CenterCrop(224, 224)], name='img_augmentation')

from tensorflow.keras.applications import EfficientNetB0
from tensorflow.keras.layers import Input, GlobalAveragePooling2D, Dense, Dropout
from tensorflow.keras.layers.experimental.preprocessing import CenterCrop
from tensorflow.keras.models import Model
from tensorflow.keras.metrics import AUC
auc = AUC()
inputs = Input(shape=(299, 299, 3))
x = img_augmentation(inputs)
x = EfficientNetB0(weights='imagenet', include_top=False)(x)
x = GlobalAveragePooling2D()(x)
x = Dense(512, activation='relu')(x)
x = Dropout(rate=0.25)(x)
outputs = Dense(1, activation='sigmoid')(x)
model = Model(inputs=inputs, outputs=outputs)
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=[auc])
model.summary()