I am taking Andrew NG’s deep learning course. He said stochastic gradient descent means that we update weights after we calculate every single sample. But when I saw examples for mini batch training using pytorch, I found that they update weights every mini batch and they used SGD optimizer. I am confused by the concept.