some code to debug the sprase GP gradients with.