What is N? If it's the minibatch size, it should be the subscript of m rather than n. @brett1479 right? https://davidrosenberg.github.io/mlcourse/ConceptChecks/1-Lec-Check_sol.pdf I think should be the same as: https://davidrosenberg.github.io/mlcourse/Archive/2017Fall/Lectures/02b.SGD.pdf#page=20 ?