Error in homework 7 correction ?

Re: Error in homework 7 correction ?

by Edoardo Remelli -
Number of replies: 0

Hey Guillaume,

You are right, there is a little mistake in the gradient implementation, which should be:

(2.0/ (y_pred.shape[0]*y_pred.shape[1]) ) * (y_pred - y_true)

Thanks for spotting it.

However, note that the "buggy" gradient is simply a re-scaled version of the correct one, so it is not surprising that back propagation works nonetheless. To convince yourself, you can think about the role of the learning rate when optimizing the parameters of your network: at the end of the day what really matters is the direction of the gradient, and not its absolute value!

Hope this helps,

Edoardo