problem_23: fix sparse gradient.