MZQMohd Zamin Quadri
All work

Deep learning experiment

CIFAR-10 CNN: A Reproducible Baseline

An image classifier with its full record kept.

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.
  1. Problem

    Often only the best number survives.

  2. How it was solved

    I kept the configuration and results for every class.

    1. Data
    2. CNN
    3. Per-class results
  3. Result

    64.26%

    test accuracy

    • Worst class33.5%
    • Overall64.26%
    • Best class82.0%
  4. Built with

    • PyTorch
    • torchvision
    • NumPy
    See the evidence on GitHub
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.

Deep learning experiment / Vision

Sixty-four percent is the mean of ten very different numbers, and the boundary the model learned best is not one of the ten it was asked for.

Tracked test accuracy64.26%

A test set audited, and a mean pulled apart

hashed and searchedselects the checkpointCIFAR-10 subsetSeeded splits, fixed beforeanything is trained.Contamination auditContent hashes andnearest-neighbour distance…CNN trainingA small convolutional network,trained from scratch.Validation selectionWhere the kept checkpoint ischosen.Test evaluationOne accuracy figure, and theconfusion matrix behind it.Class diagnosticsTen per-class figures, from33.5% to 82.0%, under one…
The contamination audit sits beside the pipeline rather than in it - it asks whether the test set is one, not how the model does on it. The per-class diagnostics are separated from evaluation because one number and ten numbers are different claims.

This diagram in words

  1. CIFAR-10 subset source — Seeded splits, fixed before anything is trained.
    torchvision
  2. Contamination audit artifact — Content hashes and nearest-neighbour distance, flips included.
  3. CNN training process — A small convolutional network, trained from scratch.
    PyTorch
  4. Validation selection gate — Where the kept checkpoint is chosen.
  5. Test evaluation process — One accuracy figure, and the confusion matrix behind it.
    scikit-learn
  6. Class diagnostics artifact — Ten per-class figures, from 33.5% to 82.0%, under one mean.

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 x 32 x 32input
  2. Conv block 132 x 16 x 1610,272 params
  3. Conv block 264 x 8 x 855,680 params
  4. Conv block 3128 x 4 x 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.
Read the full background

Problem

Why this work exists

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

Contribution

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.

  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.

How it was built

System

Workflow and decisions

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

Evidence

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 to 82.0%

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

How the work is checked

Quality 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

Limitations

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

What this changed in my practice

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