Mohd Zamin Quadri

GitHubLinkedIn

All work

Deep learning experiment

CIFAR-10 CNN: A Reproducible Baseline

A compact PyTorch image-classification experiment with a tracked configuration, learning history, class-level diagnostics, and an honest reference result.

Role
Project author
Classification
Reproducible experiment
Inspect repository
One number covering ten very different ones: 64.26% overall, from 33.5% on cat to 82.0% on automobile.The tracked ten-by-ten confusion matrix, every cell a real count over a thousand test images per class. The diagonal lights, then the off-diagonal mass, then the grid separates into vehicles and animals; the cat row lifts clear, showing 335 correct against 291 sent to dog and 145 to frog. Per-class accuracy fans out beneath the grid from 33.5 for cat to 82.0 for automobile, with the headline 64.26 drawn across them as the mean it is, and the sequence closes on the split the model actually learned: 78 per cent on vehicles against 55.1 on animals, with 82 per cent of all errors staying inside their own group.

01 / 12One imageA CIFAR-10 test image, at the size the network actually receives it.

Dataset
CIFAR-1010 classes, 32 x 32 RGB
This image
cattest index 0, shown at native size
Test set
10,0001,000 per class
A CIFAR-10 test image of class cat, 32 by 32 pixelscatA CIFAR-10 test image of class dog, 32 by 32 pixelsdogA CIFAR-10 test image of class automobile, 32 by 32 pixelsautomobile
Real CIFAR-10 test images at their native 32 x 32 RGB. Every input to this model is 3,072 numbers, and no more.
Shapes, measured from the module rather than described
  1. Input3 × 32 × 32input
  2. Conv block 132 × 16 × 1610,272 params
  3. Conv block 264 × 8 × 855,680 params
  4. Conv block 3128 × 4 × 4221,952 params
  5. Classifier10527,114 params

Custom CNN (3 conv blocks + FC), 815,018 trainable parameters. Trained on 15,000 of the 50,000 training images for 12 epochs with Adam and OneCycleLR.

Per-class accuracy against the 64.26% aggregate
  1. airplane73%
  2. automobile82%
  3. bird35.3%
  4. cat33.5%
  5. deer46.9%
  6. dog60.5%
  7. frog81.6%
  8. horse72.8%
  9. ship76.3%
  10. truck80.7%

The aggregate is the mean of a 48.5-point spread, from 33.5% on cat to 82% on automobile. The four vehicle classes average 78%; the six animal classes average 55.1%.

Confusion matrix, 10,000 test images. Rows are the true class, columns the predicted class.
Counts of test images by true class and predicted class. The largest off-diagonal value is 291, where cat was predicted as dog.
True classairpautobirdcatdeerdogfroghorsshiptruc
airplane730385759619198829
automobile148201223101011127
bird111935367113123133531622
cat20135833537291145392636
deer408703746945170147104
dog135491395060538761015
frog90225954178167106
horse9318265511417728129
ship109591190710376329
truck311042615131714807

The largest single cell off the diagonal is 291: cat predicted as dog. The model finds 33.5% of cats, and sends nearly as many of them to dog as it gets right. 82% of all 3,574 mistakes stay inside the vehicle group or inside the animal group — the boundary the model learned best is not one of the ten it was asked for.

Test accuracy
64.26%
Best validation
62.47%
Final train accuracy
57.7%
Epochs
12
  • A bounded educational baseline15,000 of the 50,000 training images and twelve epochs on a laptop GPU. It is not a state-of-the-art result and the repository does not present it as one.
  • No checkpoint, so no activationsThe run's weights are deliberately not versioned. Every feature map in this world is drawn from the architecture's real shapes; none is a recorded activation, and no prediction is shown for any individual image.
  • The run had not convergedValidation loss was still falling at the final epoch and training accuracy was still below validation accuracy. Twelve epochs was a budget, not a stopping criterion.
  • The aggregate is the least useful number64.26% is the mean of a 48.5-point spread, from 33.5% on cat to 82.0% on automobile. Quoting it alone describes almost nothing about the model's behaviour.
  • The matrix was read from a figureOnly the confusion figure is tracked, not its underlying array. It was transcribed and then checked against the per-class accuracies, the trace and every precision in the classification report before being used.
  • One run, one seedA single reference run. Nothing here establishes variance across seeds or across repeated training.

01Problem

Why this work exists

Small vision experiments are easy to overstate when only the best headline number survives and the run configuration is lost.

02Contribution

What I can claim

Implemented the training and evaluation path, tracked one bounded reference run, and retained per-class performance and plots rather than claiming an unrecorded full-dataset result.

Method

Detail traded for meaning

A convolutional stack answers a classification question by discarding almost everything, in a specific order.

  1. Represent

    The input is a grid of pixels - all detail, no interpretation.

  2. Abstract

    Each layer keeps fewer, larger features. Resolution falls as meaning rises, which is the trade the architecture exists to make.

  3. Decide

    What survives is a short list of scores over classes.

  4. What this does not show

    This is a compact baseline on a small, well-studied dataset. Its value is a reproducible reference point, not a competitive result.

03System

Workflow and decisions

  1. 01CIFAR-10 subset
  2. 02CNN training
  3. 03Validation selection
  4. 04Test evaluation
  5. 05Class diagnostics
  • PyTorch
  • torchvision
  • NumPy
  • Matplotlib
  • scikit-learn

04Evidence

What is actually versioned

Tracked test accuracy64.26%

15,000 training samples, 12 epochs, and 815,018 parameters in the versioned reference run.

Diagnostic range33.5–82.0%

Per-class accuracy exposes large variation hidden by the aggregate score.

05Quality controls

How the work is checked

  • Run configuration and metrics are stored together
  • Learning curves, confusion matrix, and class-level results are tracked
  • The portfolio uses the recorded 64.26% result rather than an aspirational 85% claim

06Limitations

Where the evidence stops

  • A bounded educational baseline, not a state-of-the-art result
  • The reference run uses a 15,000-image training subset
  • No trained checkpoint is versioned

What this changed in my practice

Reproducibility means keeping the unglamorous context—the subset, epochs, configuration, and weak classes—next to the score.