liveBook · Manning

Machine learning

As explained in Deep Learning with PyTorch, Second Edition

A class of methods in which systems learn patterns from data to perform tasks without being explicitly programmed with task rules.

Machine learning fits a model to examples so it can produce useful outputs for new, sufficiently similar inputs without receiving explicit task rules. The model contains parameters whose values are estimated from data. section 5.0 section 5.1

A typical learning process is:

  • Provide input data paired with desired outputs. section 5.0
  • Use a loss function to measure prediction error. section 5.8
  • Compute how the loss changes with each parameter and update parameters toward lower loss. section 5.2 section 5.8
  • Repeat the process, then evaluate on held-out validation data to check generalization. section 5.2 section 5.8

For neural-network training, the practical loop is forward propagation, loss calculation, backpropagation, and an optimizer step. PyTorch supplies autograd for gradients and optimizers for parameter updates; clearing accumulated gradients prevents them from affecting later updates. section 5.8

Fitting a noisy dataset

Start with a simple model and noisy observations, estimate its parameters by hand, and progressively let PyTorch perform differentiation and optimization. The same exercise exposes the essential mechanics later used to train neural networks, even though the initial model is not itself a neural network. section 5.2 section 5.6

Figure 5.2 Our mental model of the learning process.
figure

Use the mental model of learning to connect examples, model predictions, error, gradients, and parameter updates into one iterative process. section 5.2

How Deep Learning with PyTorch, Second Edition covers it

How deep it goes
Explains parameter optimization, gradients, validation, and PyTorch training mechanics while deferring more powerful neural-network applications.
Examples
Uses noisy-data fitting, a thermometer problem, and Kepler’s model-selection story to make data-driven modeling concrete.
What it assumes
Assumes basic data and model familiarity while introducing parameter estimation, loss, gradients, autograd, and optimization from fundamentals.
What you can do after
Build a simple learning algorithm, optimize parameters with PyTorch, and evaluate generalization using validation data.
How it connects
Links model parameters, loss functions, gradient descent, backpropagation, autograd, optimizers, validation sets, and overfitting.

Also explained in

Compare how 42 books explain machine learning →

Related concepts

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