Gradient Checking
Welcome to the final assignment for this week! In this assignment you will learn to implement and use gradient checking.
You are part of a team working to make mobile payments available globally, and are asked to build a deep learning model to detect fraud--whenever someone makes a payment, you want to see if the payment might be fraudulent, such as if the user's account has been taken over by a hacker.
But backpropagation is quite challenging to implement, and sometimes has bugs. Because this is a mission-critical application, your company's CEO wants to be really certain that your implementation of backpropagation is correct. Your CEO says, "Give me a proof that your backpropagation is actually working!" To give this reassurance, you are going to use "gradient checking".
Let's do it!
这一章节主要介绍了一种检查反向传播是否发生错误的方法,数值逼近。在反向传播的过程中,我们可能在求导的过程中极可能出错,采用这种方法就可以确定我们推导的公式是正确的。
1、1-dimensional gradient checking
一层的梯度检查,简单来说,我们先正常的利用方向传播函数计算出,然后利用在领域极限的定义计算