I am kind of stuck here. All the previous assignment function for this week have passed. This assignment UNQ_C5 GRADED FUNCTION: gradient_descent, just involves calling the functions that have already been tested so I am not sure where to start debugging this function when the unit tests fail.:
I get the following results on running the unit tests:
9 Tests passed
7 Tests failed
The expected values of w1, w2, b1 and b2 are not as expected in cases of failures. The difference is values are very minutely different, similar to the difference in the basic test.
Also, my outputs for the basic test are slightly off, but the note says that slight difference in numbers is expected:
Another thing, I wanted to mention was that to pass the back_prob unit tests I had to remove ‘relu’ from the formula given in the lecture.
Can a mentor give me some directions as to where the problem could be?
You should recheck all the called functions again, also you need to clip l1 for negative values of z…
Clipping for L1 values has already been provided in the notebook.
I should have been more clear in my statement: I had to remove relu from grad_b1 calculations to pass the unit tests. Either the lecture slides have incorrect formula for grad_b1 or the unit tests are incorrect
Below is my back_prob function:
And here is my gradient descent function.
Do you see any issues?
First and most important is to not post code solutions on public!!
Second in the back_prop function remove the relu calculation, its not needed there.
Sorry about posting the code. I thought posting incorrect code was not an issue. Posting correct solutions was prohibited. I’ll take care of it in future. Are we allowed to post incorrect code?
Please check the lecture slides:
I thought the step() function implied relu. if not, what does it mean?
- With your suggestion, I was able to pass all tests.
Please do not. If a mentor needs to see your code, we’ll contact you with instructions.
You can post screen capture images of any error messages or asserts. That’s usually enough to diagnose the issue.
In this context the step is the l1.
Can you clarify more about step() function. How to create it? is it just the
Thanks in advance!