W 3 | A1 | Ex-3- Initialize Parameters| Problem with np.random.seed

In this programming assigment (planar-data-classification-with-one-hidden-layer), when implementing initialize_parameters function, although I get the shape of w1,b1,w2,b2 all right, the values are wrong in comparison with expected output. I think nothing I can fix with my code there but instead, it is an issue with the np.random.seed(2)

Mentors don’t have access to your coursera jupyter workspace. So, there’s no point sharing your lab url at this point.

The seed provided in the starter code shouldn’t be modified. The test code relies on it to validate your implementation. It’d be helpful if you could provide more details without sharing code (sharing stacktrace is ok). If not, please click my name and message your notebook as an attachment.

Please use np.random.randn and not np.random.rand when initializing weights.

1 Like

Thank you very much for your help! This mistake ended up being a blessing in disguise! Thanks to it. I have learned about the difference between uniform distribution and standard distribution.