liveBook · Manning

Gradient descent

As explained in Classic Computer Science Problems in Swift: Essential techniques for practicing programmers

Gradient descent is an iterative optimization method that updates parameters opposite the gradient of an objective function to reduce its value.

Gradient descent updates neural-network weights to reduce error. Each weight is adjusted using its prior input, the neuron’s delta, and a learning rate; the process repeats as training continues. section 7.2

Updating a network

After calculating deltas, adjust every weight in the hidden and output layers. Train again with another input and expected output, then test the network against known answers. section 7.2

Figure 7.6. The weights of every hidden layer and output layer neuron are updated using the deltas calculated in the previous steps, the prior weights, the prior inputs, and a user-determined learning rate.

See how deltas, prior weights, prior inputs, and the learning rate contribute to updating weights across network layers. section 7.2

How Classic Computer Science Problems in Swift: Essential techniques for practicing programmers covers it

How deep it goes
Describes the weight-update rule and learning-rate role, but stops short of explaining why backpropagation works.
Examples
Uses updates across hidden and output layers, followed by repeated training and testing on known answers.
What you can do after
Apply the update rule to adjust network weights and continue training with new input-output examples.
How it connects
Connects gradient descent with backpropagation, neural networks, error functions, and learning rates.

Also explained in

Compare how 17 books explain gradient descent →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Classic Computer Science Problems in Swift: Essential techniques for practicing programmers. The section links point to the parts of the book it draws on.