Stages 2–4 · Small verification run

Run the full initial TensorFlow pipeline.

The code below prints the model summary, trains for two epochs, plots real train/validation accuracy and loss, evaluates the held-out test split, and creates two real sample predictions. It does not fabricate a result.

Split: 70 / 15 / 15

The script creates a reproducible class-by-class split. Validation guides the short run; test data is evaluated only after training.

224 × 224 and normalized

Images are decoded as 3-channel tensors, resized to 224 × 224, then mapped from [0, 255] to [-1, 1].

Conservative augmentation

Small rotation, translation, zoom, and contrast variation. Horizontal/vertical flips are deliberately excluded.

Frozen EfficientNetV2B0

ImageNet feature layers begin frozen. Only the pooling, dropout, and softmax classification head learn in this stage.

requirements.txt

Install these dependencies inside your activated virtual environment.

tensorflow>=2.16
matplotlib>=3.8
numpy>=1.26

What to say during the review

  1. 1. “I first inspect folder names and counts, so I do not assume the dataset labels.”
  2. 2. “The split is stratified by class and reproducible using a fixed seed.”
  3. 3. “Input tensors are resized to 224 × 224 and normalized for pretrained EfficientNetV2.”
  4. 4. “The base model is frozen; this initial run validates the data flow rather than claims final accuracy.”
Initial 20% scope only: inspection, splitting, preprocessing, augmentation, and a frozen EfficientNetV2 classifier. CBAM and Grad-CAM++ are intentionally out of scope.
⚡Built with GenMB