I believe autograder is incorrect

I believe my code is correct but the autograder say’s it’s not. What should I do?

The part of the lab that fails is 4.2 - Initialize the model’s parameters.
I used the advice shown below so I don’t see how I can be in error. My W1, W2, b1, and b2 shapes are the same as the correct answers except the numbers are different.

  • You will initialize the weights matrices with random values.
    • Use: np.random.randn(a,b) * 0.01 to randomly initialize a matrix of shape (a,b).
  • You will initialize the bias vectors as zeros.
    • Use: np.zeros((a,b)) to initialize a matrix of shape (a,b) with zeros.

Which “numbers” are you referring to?

Please show us the output that you get when running that test cell. The most common error is to use the wrong random function (rand instead of randn). If all your values are positive, then that indicates you made that mistake.

The test cases here have been in use for quite a while and literally thousands of students have used them, so it’s not a good strategy to assume that the tests are broken if your code fails the tests.

Also note that you filed this thread under DLS C4 ConvNets, but it’s about DLS C1, so I moved it for you.

Thanks Paul - I was kind of puzzled that all my numbers were positive.
It worked fine.
I’m kicking myself for not asking earlier - I spent a lot of time on this.

1 Like

Using the Forum (either with mentors or using the Search tool) can save you a lot of headaches.

Glad to hear that you found the solution based on the above info. The other “meta” lesson here in addition to using the forums is that the instructions in the notebooks are generally quite complete. Notice that they literally wrote out the correct code for you in the instructions. You could have “copy/pasted” it and filled in the dimensions, which would have avoided this problem. When you find things don’t work and the first round of debugging gets you nowhere, it is worth taking a careful look at the instructions again.