liveBook · Manning

Chapter 9: ConvNet architecture patterns

What you will learn in chapter 9 of Deep Learning with Python, Third Edition

This introduction explains how architecture choices shape what a model can learn and how easily gradient descent can learn it.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction explains how architecture choices shape what a model can learn and how easily gradient descent can learn it.

Key terms: architecture, hypothesis space, gradient descent, prior knowledge, translation-invariant, search space, convolution layers, intuition, pattern matching, best practices

9.1 Modularity, hierarchy, and reuse

This section applies modularity, hierarchy, and reuse to ConvNet architecture, explains a limit of deeper stacks, and advocates ablation studies for testing architectural choices.

Key terms: modularity-hierarchy-reuse (MHR) formula, modules, layers, hierarchy, reuse, blocks, feature hierarchies, feature maps, filters, Xception

9.2 Residual connections

This section explains how residual connections help gradients pass through deep ConvNets and how to make their input and output shapes compatible.

Key terms: backpropagation, vanishing gradients problem, gradient information, residual connection, information shortcut, block, same shape, 1 × 1 Conv2D, residual projection, strides

9.3 Batch normalization

This section explains how batch normalization handles intermediate activations, why it is useful in deep ConvNets, and how to place and configure it in practice.

Key terms: data normalization, intermediate activations, zero mean, unit variance, BatchNormalization, current batch, mean, variance, inference, exponential moving average

9.4 Depthwise separable convolutions

This section explains how depthwise separable convolutions work, why they can make ConvNets more efficient, and why fewer operations do not necessarily mean faster GPU execution.

Key terms: depthwise separable convolution, SeparableConv2D, spatial convolution, pointwise convolution, spatial features, channel-wise features, intermediate activations, prior, trainable parameters, floating-point operations

9.5 Putting it together: A mini Xception-like model

This section combines the chapter’s ConvNet architecture practices in a smaller Xception-like model and compares its dogs-versus-cats results with the previous model.

Key terms: repeated blocks, residual connections, batch normalization, SeparableConv2D, Xception, trainable parameters, test accuracy, hyperparameters, architecture best practices

9.6 Beyond convolution: Vision Transformers

The section introduces how Vision Transformers process images and explains why ConvNets remain the better choice for most small-scale image classification tasks.

Key terms: Vision Transformers, ViTs, 1D sequence of patches, long-range relationships, massive dataset, spatial prior, data efficient, ImageNet, ConvNets

9.7 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 8: Image classification Chapter 10: Interpreting what ConvNets learn →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.