liveBook · Manning

Nonlinear mapping

As explained in Deep Learning with PyTorch, Second Edition

A process whose behavior cannot be represented as a simple linear relation between inputs and outputs.

A nonlinear mapping relates inputs and outputs in a way that repeated linear transformations alone cannot represent. Neural networks create this behavior by composing linear transformations with differentiable activation functions, allowing them to approximate complicated relationships without a handcrafted formula. section 6.1.6 section 6.1.5

Activation functions make the mapping useful for learning:

  • Break repeated affine transformations out of a single linear form, enabling more complex functions. section 6.1.5
  • Remain differentiable, or tolerate limited derivative discontinuities, so gradients can support training. section 6.1.5
  • Provide sensitive input ranges where changes affect the output and saturated ranges where gradients become small. section 6.1.5

Composing neurons

A single tanh neuron produces a basic S-shaped response. Adding neurons creates bumps and curves; composing those outputs across two layers produces multiple positive and negative bumps that a single neuron cannot express. The same idea lets a network model tasks such as deciding whether an image contains a dog. section 6.1.6

Figure 6.6 Composing multiple linear units and tanh activation functions to produce nonlinear outputs
figure

Trace how linear units and tanh activations combine into increasingly varied nonlinear outputs. section 6.1.6

How Deep Learning with PyTorch, Second Edition covers it

How deep it goes
Defines nonlinearity through activation functions, gradient-friendly behavior, saturation, and composed tanh examples, stopping short of dense theory.
Examples
Uses tanh neurons, summed bumps, two-layer compositions, Hardtanh approximations, and image-based dog detection.
What you can do after
Build it from scratch by composing linear units and differentiable activations to approximate complex input/output relationships.
How it connects
Connects nonlinear mappings to activation functions, affine transformations, gradient descent, backpropagation, and universal approximation.

Also explained in

Compare how 7 books explain nonlinear mapping →

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.