Separating backprop and SGD more cleanly