liveBook · Manning

Quantization

As explained in Math and Architectures of Deep Learning

The conversion of floating-point region boundaries or ratios into integer-aligned indices for feature extraction.

Quantization converts continuous or floating-point values into discrete buckets or integer-aligned indices. In feature extraction, it makes RoI pooling regions executable on a discrete feature map. section 5.6 section 11.4.3

The treatment uses quantization in two related ways:

  • Discretize random variables by assigning ranges such as weight or height intervals to buckets and estimating each bucket’s probability. section 5.4.2
  • Convert floating-point RoI-to-bin ratios into integer region sizes, using the closest integer or floor operation in the original implementation. section 11.4.3
  • Preserve a fixed output shape while allowing the input RoI and pooling-region size to vary. section 11.4.3

Quantizing an RoI for pooling

If a feature-map RoI has height 8 and the target pooling grid has four rows, each region is 8/4 = 2 feature-map units. When the ratio is fractional, quantization selects an integer size; RoIAlign instead uses bilinear interpolation. section 11.4.3

Figure 11.18 A conv feature map with two regions of interest of different sizes. RoI pooling extracts a fixed-sized output feature map (2 × 2 in this image) from each of the RoIs in a single pass via max pooling. This enables us to extract fixed-sized representative feature vectors for each RoI, which are then fed into further classifier and regressor layers for classification and localization.

Compare differently sized RoIs producing fixed-sized pooled feature maps through max pooling. section 11.4.3

How Math and Architectures of Deep Learning covers it

How deep it goes
Defines bucketization and integer rounding, explains their effects on probability distributions and RoI pooling, and defers RoIAlign details.
Examples
Uses height and weight buckets, fractional RoI dimensions, and fixed-size pooled feature maps as concrete examples.
What it assumes
Assumes basic probability and feature-map geometry while explaining bucketization and floating-point-to-integer conversion directly.
What you can do after
Apply it via RoI pooling to turn variable-sized regions into fixed-sized feature representations.
How it connects
Connects quantization with random variables, probability distributions, RoI pooling, max pooling, RoIAlign, and bilinear interpolation.

Also explained in

Compare how 13 books explain quantization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Math and Architectures of Deep Learning. The section links point to the parts of the book it draws on.