diff --git a/run.sh b/run.sh index 3143f52..cbd7eb9 100755 --- a/run.sh +++ b/run.sh @@ -16,7 +16,8 @@ source "$VENV_DIR/bin/activate" # 3. Install dependencies (lightweight, safe to re-run) echo "Installing dependencies..." pip install --upgrade pip -pip install pandas numpy matplotlib seaborn pillow scikit-learn tensorflow +pip install pandas numpy matplotlib seaborn pillow scikit-learn +pip install install "tensorflow[and-cuda]" pip install --upgrade kagglehub[pandas-datasets,hf-datasets] python3 skin_cancer_classification.py diff --git a/skin_cancer_classification.py b/skin_cancer_classification.py index 3c41f77..d0cacd5 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