The Stochastic Gradient Descent (SGD) algorithm is an optimization algorithm. It is used by neural networks in the field of Deep Learning to train Machine Learning algorithms. The role of this algorithm is to identify a set of internal model parameters that exceed other performance measures such as the mean squared error or log loss.