Machine Learning, Python, Deep Learning, Data Science, Pytorch.
decrease in loss by changing a weight element is proportional to the value of the gradient of the loss w.r.t. that element. This forms the basis for the optimization algorithm that we’ll use to improve our model. Before we proceed, we reset the gradients to zero by calling .zero_() method. We need