Hong Kong Baptist University · FACULTY OF COMPUTER SCIENCE

MATH7005 Chap.7 Convolution, Pooling and Feature Maps

- one subject, every graph, every model, every mark
6 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 7 of 10 · MATH7005

Convolution, Pooling and Feature Maps

Local patterns with shared weights

Convolution applies one small kernel at many spatial locations, reducing parameter count and detecting a learned pattern across an image.

The chapter separates spatial output dimensions from channel counts and parameter counts, then traces ReLU and max pooling on explicit numeric patches.

What to verify

State kernel size, padding, stride, input channels and output filters before calculating.

For segmentation, distinguish channel compression through a small kernel from spatial upsampling and explain how skip connections recover fine location information.

Spatial size and channel count are separate

The output side follows input size, padding, kernel and stride. The number of filters supplies the output channels.

Parameter count then uses kernel area, input channels and output filters, not image width and height. Keeping these ledgers separate prevents a plausible spatial result from hiding a wrong channel or weight calculation.

Pooling changes evidence resolution

Max pooling keeps the strongest response inside each window and sends the backward signal to the winning location.

It reduces spatial detail without adding learned parameters. Inspect whether small or boundary objects disappear after repeated pooling, because an aggregate classification score may not reveal which information was removed.

Segmentation needs aligned output

A classifier can compress an image into one decision, while segmentation must return a grid aligned with the input.

An encoder-decoder architecture upsamples the representation and uses skip connections to recover fine structure. Verify crop, resize and alignment conventions before attributing a shifted boundary to the learned filters.

In this chapter

What this chapter covers

  • 01

    Shared convolution kernel

  • 02

    Spatial output size

  • 03

    Input and output channels

  • 04

    ReLU feature map

  • 05

    Max pooling

  • 06

    Segmentation and U-Net

Worked example · free

Count one convolution layer

Q [6 marks]. A layer receives six channels, uses eight filters of size 3 by 3 and one bias per filter. How many parameters does it contain? This AskSia-created question has marks for revision only, not an official University assessment scheme.
Convolution is a repeated local inner product.Convolution is a repeated local inner product. The same kernel moves across the input, so a learned pattern can be detected at several positions without learning separate weights.One kernel is reused at every valid location1201312201312210kernel1 00 −10The highlighted patch gives 1(1)+2(0)+3(0)+1(−1)=0.
Convolution is a repeated local inner product. The same kernel moves across the input, so a learned pattern can be detected at several positions without learning separate weights.
  • 2Count weights in one filter.
  • 2Include all filters.
  • 2Add the biases.
One filter contains 3 times 3 times 6 = 54 weights. Eight filters contain 432 weights, and eight biases bring the total to 440 trainable parameters.
Sia tip — Channels enter the parameter count; image width and height do not.
Glossary

Key terms

Convolution Kernel
A small learned weight array reused across spatial positions.
Feature Map
One spatial output channel produced by applying a filter across an input.
Padding
Values added around an input boundary to control output size and edge coverage.
Stride
The spatial step taken when the convolution or pooling window moves.
Max Pooling
A parameter-free operation that retains the largest value in each local window.
FAQ

Convolution, Pooling and Feature Maps FAQ

Why does convolution use fewer parameters?

The same small kernel is reused at every spatial location. Parameter count therefore depends on kernel dimensions and channel counts, rather than growing with the full image width and height.

What determines the output image size?

Input size, kernel size, padding and stride determine each spatial side. The number of output filters determines the channel count, which must be appended separately after calculating height and width.

Why does segmentation need a decoder?

Classification can compress spatial detail into one label, while segmentation must return a label at each location. A decoder upsamples the representation, and skip connections restore detail from matching encoder stages.

How should I test whether a filter learned a local pattern?

Shift or mask the suspected pattern while holding other content fixed and inspect whether the feature response moves or weakens predictably. This controlled perturbation is stronger evidence than selecting one attractive activation map.

Why inspect preprocessing beside the model input?

Resize, crop and channel order may change what the network actually received. Displaying the transformed tensor beside the original prevents a preprocessing mismatch from being mistaken for a learned spatial failure.

What should a spatial failure review preserve?

Keep the original input, transformed tensor, prediction, target and a short error category together. Sorting by edge, scale, background or alignment failure exposes repeated patterns that an overall metric or confidence ranking can hide.

Does pooling add trainable parameters?

Ordinary max or average pooling has no learned weights; it applies a fixed local reduction. It still changes spatial resolution and information flow, so record its window, stride and padding when tracing tensor shapes.

Study strategy

Assessment move

Start with a four-by-four numeric grid and a two-by-two kernel. Calculate one local inner product, slide the kernel and build the full valid output before using a library. On separate lines, compute spatial size, output channels and trainable parameters for several padding and stride settings. Apply ReLU and max pooling to explicit windows and trace where the backward gradient would go.

In code, print the tensor after every block and compare an edge case with and without padding. For a segmentation example, verify that the final grid aligns with the input and inspect boundary errors. Preserve transformed inputs beside originals so preprocessing cannot be mistaken for model behaviour.

Working through Convolution, Pooling and Feature Maps in MATH7005? Sia is AskSia’s AI Computer Science tutor — ask any MATH7005 Convolution, Pooling and Feature Maps question and get a clear, step-by-step explanation grounded in how MATH7005 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 12 of your Hong Kong Baptist University subjects - and 1,000+ Bibles across every Australian university.
Sia - your MATH7005 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works