liveBook · Manning

Pruning

As explained in Deep Learning with Python, Third Edition

A model-compression technique that removes less important weights or connections to reduce model size and cost.

Pruning compresses a trained model by removing less significant weights or connections. It targets deployments constrained by memory, power, or latency, accepting a small performance cost for a smaller model. section 6.3.2

Use pruning as a controllable size–accuracy tradeoff:

  • Keep the most significant coefficients in each weight tensor and remove the rest. section 6.3.2
  • Tune the pruning amount: more pruning can reduce memory and compute further, but may reduce performance metrics. section 6.3.2
  • Optimize before importing the model into TensorFlow.js or exporting it to TensorFlow Lite. section 6.3.2

How Deep Learning with Python, Third Edition covers it

How deep it goes
Defines coefficient selection and the size–accuracy tradeoff but does not provide pruning code or algorithmic internals.
Examples
Uses constrained smartphones, embedded devices, and low-latency applications as deployment examples.
What you can do after
Apply pruning by tuning how many model coefficients to retain before deployment.
How it connects
Connects pruning with inference optimization, quantization, TensorFlow.js, and TensorFlow Lite deployment.

Also explained in

Compare how 7 books explain pruning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with Python, Third Edition. The section links point to the parts of the book it draws on.