updated gradWeight and gradBias