Slide 11, weights should be indexed as w_jd throughout. x should be indexed by d, not i, in the gradient equation.