From 6a25385409f48abb1416bcb7fd480a6e627d57f2 Mon Sep 17 00:00:00 2001 From: BinarySandia04 Date: Thu, 21 May 2026 14:59:29 +0200 Subject: [PATCH] Test --- skin_cancer_classification.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/skin_cancer_classification.py b/skin_cancer_classification.py index 61b4c54..3c41f77 100644 --- a/skin_cancer_classification.py +++ b/skin_cancer_classification.py @@ -271,9 +271,9 @@ x = Dense(512, activation='relu')(x) # Added another Dense layer x = Dense(256, activation='relu')(x) # Existing Dense layer predictions = Dense(1, activation='sigmoid')(x) # Output layer for binary classification -with strategy.scope(): # Use all gpus - model = Model(inputs=base_model.input, outputs=predictions) - model.compile(optimizer=Adam(learning_rate=0.0001), loss='binary_crossentropy', metrics=['accuracy']) +# with strategy.scope(): # Use all gpus +model = Model(inputs=base_model.input, outputs=predictions) +model.compile(optimizer=Adam(learning_rate=0.0001), loss='binary_crossentropy', metrics=['accuracy']) """## 4. Data Generators @@ -340,9 +340,10 @@ model_checkpoint = ModelCheckpoint( ) # Train the model +print("Training model...") history = model.fit( train_generator, - epochs=3, # You can adjust the number of epochs + epochs=50, # You can adjust the number of epochs validation_data=val_generator, callbacks=[early_stopping, model_checkpoint], class_weight=class_weights # Use class weights to handle imbalance