liveBook · Manning

Gradient

As explained in Machine Learning Algorithms in Depth

A gradient is a vector of partial derivatives that indicates how a scalar function changes with respect to its variables.

A gradient is a vector of partial derivatives describing how a scalar loss changes with respect to model parameters. For minimization, optimization moves parameters in the gradient’s negative direction. section 10.4

Neural-network optimization uses the gradient to determine parameter updates:

  • Stochastic gradient descent computes the loss gradient on a mini-batch and updates parameters using a learning rate. section 10.4
  • Momentum accumulates an exponentially decaying average of past gradients, making step size depend on gradient magnitude and alignment. section 10.4
  • Nesterov momentum evaluates the gradient after applying the current velocity, adding a correction to the update. section 10.4
  • Learning-rate schedules control update size; rates that are too high can miss optima, while rates that are too low prolong training. section 10.4

Training a convolutional network

A CNN trained on CIFAR-100 can compare cross-entropy loss and validation accuracy under different gradient-based optimizers. section 10.4

How Machine Learning Algorithms in Depth covers it

How deep it goes
Explains gradient-based update directions, learning rates, momentum, Nesterov momentum, and adaptive optimization methods.
Examples
Uses a CIFAR-100 convolutional neural network and compares cross-entropy loss and validation accuracy across optimizers.
What you can do after
Apply it via stochastic gradient descent or related optimizers to train convolutional neural networks.
How it connects
Connects gradients to loss functions, stochastic gradient descent, learning-rate schedules, momentum, Nesterov momentum, and AdaGrad.

Also explained in

Compare how 20 books explain gradient →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Algorithms in Depth. The section links point to the parts of the book it draws on.