Debugging neural networks with gradient checking