Hello, I’m not getting the good answer on Question 6 and I don’t know where my code is wrong.

Can any mentor look at my notebook and help me figure out because at this point I don’t even know where to start.

Hello, I’m not getting the good answer on Question 6 and I don’t know where my code is wrong.

Can any mentor look at my notebook and help me figure out because at this point I don’t even know where to start.

Please realize that the mentors cannot directly see anyone else’s notebook. There are ways to share code privately using DMs (Direct Messages), but before we go to that method, please realize that debugging is part of the job of programming. You can’t just throw up your hands and say “I have no idea”. That may work here when you have mentors to help, but what happens after you graduate from these courses and are trying to solve a problem for a job or on your own. Debugging is a skill that you can develop. We talked about this a bit in your previous thread, right? But in this case, the error message just tells you that your answer is incorrect meaning the wrong numeric value. So what that means is that your code does not implement what the math formulas are telling you to do. So the first step is to review the math and make sure you understand what it means. Then carefully compare the steps in the math to what your code actually does. You must be missing something. Your job is to figure out what that is.

I recommend you start by looking at how your code computes the dj_db value.

I know that i need to send the notebook by private message. I am not asking for the solution though and I have been bashing my head at this problem for the past 4 hours by looking at the implementation in the previous labs while watching the video and making sure the steps are followed correctly but its not working. this is why I’m at the point of asking for direction. I’m not asking for the answer.

Ok, I’ll send you a DM in a second …

I might have not expressed myself correctly. Its just that after everything I’ve tried nothing seems to work and I’m a bit at lost as to where to look.

To close the loop on the public thread, the root cause of the problem was that when we calculate the gradients for the regularized case, we only need to compute the gradients for the regularization term and then add those to the gradients we already computed for the base non-regularized case. You could correctly recompute everything from scratch and get the same answer, but the actual code as written here did a hybrid strategy that was not correct.