Implement and test backprop for IP.