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.
Stages 2–4 · Small verification run
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.
The script creates a reproducible class-by-class split. Validation guides the short run; test data is evaluated only after training.
Images are decoded as 3-channel tensors, resized to 224 × 224, then mapped from [0, 255] to [-1, 1].
Small rotation, translation, zoom, and contrast variation. Horizontal/vertical flips are deliberately excluded.
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