DLS 1 Week 4 - Assignment 1 - Ex 1

Hi I am currently stumped as to what I am doing wrong with this section. Any advice would be greatly appreciated.

I have attached the output I am currently getting below:

Here is the expected output:

Along with the error which is being thrown:

Thanks in advance and please let me know if this shouldn’t be shared and I will take down immediately.

HI @Adrian_Campbell , welcome to the community!

The error is very simple: You are not using the right random function. Read again the instructions, specially the part where the required random function is mentioned.

Let me know how it goes.


1 Like

Hi @Juan_Olano, thank you for the lightning quick response! Ok I was under the impression I needed to use np.random.rand. Which was similar to the way we initialized the weights in week 3. I’m clearly missing something rather obvious here haha, will keep investigating. Thanks for your help!

Sure thing @Adrian_Campbell ! Be sure to look at the function name ‘letter by letter’ :slight_smile: so that you don’t miss or add any letter.

1 Like

Solved - thank you for the help again @Juan_Olano !!

Glad to hear you found the answer with Juan’s guidance! But also note that it was “randn” in Week 3 as well.