File Exchange

image thumbnail

Adam stochastic gradient descent optimization

version (109 KB) by Dylan Muir
Matlab implementation of the Adam stochastic gradient descent optimisation algorithm


Updated 16 Aug 2017

GitHub view license on GitHub

`fmin_adam` is an implementation of the Adam optimisation algorithm (gradient descent with Adaptive learning rates individually on each parameter, with Momentum) from Kingma and Ba [1]. Adam is designed to work on stochastic gradient descent problems; i.e. when only small batches of data are used to estimate the gradient on each iteration, or when stochastic dropout regularisation is used [2].
See GIT repository for examples:

[x, fval, exitflag, output] = fmin_adam(fun, x0 <, stepSize, beta1, beta2, epsilon, nEpochSize, options>)

See the function help for a detailed reference. The github repository has a couple of examples.

[1] Diederik P. Kingma, Jimmy Ba. "Adam: A Method for Stochastic Optimization", ICLR 2015. [](

[2] Geoffrey E Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan R. Salakhutdinov. "Improving neural networks by preventing co-adaptation of feature detectors." arXiv preprint. [](

Cite As

Dylan Muir (2020). Adam stochastic gradient descent optimization (, GitHub. Retrieved .

Comments and Ratings (1)

This implementation attempts to reject "bad steps". I believe this is wrong.


Updated description

Updated description

Updated description

Updated description

Updated description

Updated title

Updated description

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux