Hello, I’m writing for question 4.2 and the result produced is inconsistent with the expected values. I get wrong values for W1 and W2. I think the problem may be due to the random seed, and could this be due to the python environment? Have anyone else encountered the same problem? Thanks!
Hi @Hang_Lin
The random seed has nothing to do with the error. The comment has already highlighted this:
we set up a seed so that your output matches ours although the initialization is random.
What might be the problem is that you are using the wrong random generation function. It should be the np.random.randn(). So check for that.
1 Like
Right! The clue is that all your values are positive, whereas the “expected” values are both positive and negative. That means you used the wrong function. They literally wrote the code out for you in the instructions.
2 Likes