add compute_grad i.e. Backprop