If we `MutableVec` for both `beta` and `dbeta`, this loop can be replaced with `beta.add(dbeta)`.