Course-2, Week-1, Initialization Lab assignment issue

Hello!
The random initialization values returned after ‘random initialization’ in Exercise-2 does not match the results in the corresponding test. As a result, the test fails.

Did anyone have this issue?

Thanks for looking at my issue even if you are not able to help !!

-Param

Hi @Parama_Dutta,

Looking at the code segment relating to your question, I think you need to check the following:

  • Shape parameters given to the np.random.randn() call for the weight matrix
  • Whether the result of the np.random.randn() call is multiplied by 10
  • Shape parameters given to the np.zeros() call for the bias vector

Please see if these are correctly set as shown in the comment for the function.

The most common issue is using the wrong PRNG function. Note that rand is not the same thing as randn. That little n on the end there makes a big difference. :nerd_face:

Thanks. I was not paying attention to the rand->n function!

You guys rock man! That’s right!!