liveBook · Manning

Chapter 1: Introducing deep learning and the PyTorch library

What you will learn in chapter 1 of Deep Learning with PyTorch, Second Edition

The introduction positions PyTorch as an approachable Python library for building deep learning projects.

After this chapter you will be able to

Section by section

Introduction

The introduction positions PyTorch as an approachable Python library for building deep learning projects.

Key terms: PyTorch, flexibility, idiomatic Python

1.1 What is deep learning?

Defines deep learning as training neural networks from examples to perform complex tasks, while distinguishing those capabilities from human thought or self-awareness.

Key terms: deep learning, deep neural networks, instructive examples, handcrafted rules, artificial intelligence, self-awareness, approximate complicated, nonlinear processes

1.2 The shift from machine learning to deep learning

This section contrasts handcrafted features with representations learned from data, then explains how a loss function guides training.

Key terms: raw features, feature engineering, representations, prior knowledge, training, loss function, criterion, objective function, cost function, reference data

1.3 What to expect

This section explains why PyTorch is an approachable yet professional deep learning library and introduces the tensor as its foundational data structure.

Key terms: PyTorch, clear syntax, streamlined API, easy debugging, mathematical function, tensor, multidimensional array, accelerated mathematical operations

1.4 Why PyTorch?

The section explains why PyTorch is a practical choice for deep learning: familiar and expressive Python programming, fast computation with optimization support, and options for deploying models beyond Python.

Key terms: Tensor, Pythonic, expressivity, GPUs, numerical optimization, training, C++ runtime, inference, mobile devices

1.4.1 The deep learning competitive landscape

This section describes how deep learning tools consolidated around a few major frameworks and distinguishes those frameworks from Hugging Face’s application-oriented tools.

Key terms: PyTorch, TensorFlow, Hugging Face, consolidation, eager mode, compilation mode, high-level wrapper, model hub, pretrained models

1.5 How PyTorch supports deep learning projects

This section maps PyTorch’s main components onto a deep learning project, from preparing data and training a model to deploying it.

Key terms: Python API, C++, CUDA, eager mode, tensors, torch module, CPU, GPU, operation history, automatic differentiation

1.6 Hardware and software requirements

This section explains the computing, software, and storage needed to follow the book, distinguishing ordinary laptop work from more demanding training runs.

Key terms: pretrained network, CUDA-capable GPU, parameter updates, 8 GB of RAM, cloud platforms, GPU-enabled Jupyter Notebooks, Linux, macOS, Windows, Anaconda

1.6.1 Using Jupyter Notebooks

This section explains how Jupyter Notebooks run the book’s example code and how to open the notebooks from the code checkout.

Key terms: Jupyter Notebook, kernel, state, cell, Shift-Enter, Markdown-formatted text cells, notebook server, root directory, code checkout

1.7 Exercises

1.8 Summary

Where this is used later

Concepts explained in this chapter

Chapter 2: Pretrained networks →

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.