← All work
AcademicOctober 2025ENSTA (Brest Campus), embedded AI course

CNN Compression

Makes a ResNet-18 about 4× smaller and 2× faster, with almost no loss of accuracy.

44.9 → 11.4 MBmodel size after quantization
18.7 → 9.8 mslatency per image
92.23 → 92.07%accuracy, almost unchanged
Chart of accuracy against model size for FP32 and INT8

The need

Neural networks often have to run on embedded devices with little memory and compute. Can a network be shrunk heavily without losing what makes it useful, and how far can it go?

What I owned

Training, the pruning and quantization experiments, and the analysis, in a team of two.

The solution

Train
ResNet-18 on CIFAR-10Cosine learning rateAugmentation
Prune
L1 global unstructuredConvolution and linear layersSeveral pruning amounts
Fine-tune
10 epochs to recalibrate
Quantize
Post-training INT8Calibration on CIFAR-10
Each stage starts from the previous stage's checkpoint.

How it was built

Pruning was tested over a range of amounts to find where accuracy breaks. At 98%, about 233,000 non-zero parameters remain, out of about 11.2 million. Accuracy holds up remarkably well until the most aggressive levels, thanks to fine-tuning.

Remaining parameters at each pruning amount.
Accuracy after retraining at each pruning amount.

Results

Pruning removes parameters, but it does not shrink a stored file on its own, since the zeros still take up space. Quantization delivers the file size and speed gains:

  • Size: 44.9 MB to 11.4 MB, which is 25.4% of the original.
  • Latency: 18.66 ms to 9.84 ms per image, which is 52.7% of the original.
  • Accuracy: 92.23% to 92.07%, which is 99.8% of the original.
The INT8 model compared with FP32, after 98% pruning.