Gradient Check
In practice, we apply preimplemented backprop, so we don’t need to check if gradients are correctly calculated.
However, when we want to implement backprop from scratch ourselves, we need to check our gradients.
How do we do that? We approximate gradients and compare them with our implementation.
 Take all of the weights and biases and reshape them into a big vector $\Theta$.
 Take all of the gradients of weights and biases and reshape them into a big vector $d\Theta$.

For each $i$
 If $E$ is sufficiently small, we have correctly implemented back propagation. (ie. If $\epsilon=10^{7}$, and $E<10^{7}$, it is correct.)
Leave a Comment