Problem: I’ve been trying to implement random weight initialization for a multi-layer neural network, but no matter what I tried — restarting the kernel, importing the test, keeping everything inside the function — the course’s test keeps failing with the same error about global variables or hidden test cases.
Are you working on exactly a task that is part of the assignment?
Or are you attempting to add something that is outside of the test case’s expectations?
One thing to check is that you are using the correct random function. “rand” is not the same thing as “randn”
…
If that clue doesn’t help, please show us the output you are getting when you run the test that fails.
The other thing to check is that you multiplied the random output values by 10, instead of 0.01 as we did in Course 1. Note that they essentially wrote the code out for you in the instructions.
i don’t know how ,but when i multiply it by 10 not 0.01 it worked,it should be 0.01 right?
no i didn’t add something outside the function it was two lines of code that i have to write
The instructions tell you what factor to use and it is 10.
I’m not saying that you would do that in a real application and using 10 gives pretty terrible results here, but that is part of the point of this assignment.
i didn’t notice thank u for your help
