Mini-Batch Gradient Descent Mini-Batch Gradient Descent is a variation of the Gradient Descent algorithm that is commonly used in deep learning. It is also known as Stochastic Gradient Descent (SGD), although technically, SGD refers to the version of the algorithm that uses a batch size of 1. To implement Mini-Batch Gradient Descent, we first randomly shuffle the training data, and then divide it into batches of a fixed size. We then loop over the batches and perform the following steps for each batch: Compute the gradients of the loss function with respect to the model parameters using the current batch of data. Update the model parameters using the computed gradients and the learning rate. Repeat until the entire dataset has been processed a fixed number of times (epochs). Mechanism: It updates the model in small batches instead of one large batch. It reduces the variance of the parameter updates, which can lead to more stable convergence. It can make use of highly optimized matrix o
Comments
Post a Comment