Hi Faris!
Hope you are doing well. I have checked it and run it in my notebook, it works fine (no issues with the test cases), please check your implementation properly, and make sure that you are implementing all the steps correctly.
Regards,
Nithin
First rule is: always trust the error. If error say “Check you formulas for parameters[‘W1’]”, go ahead and check it. Not only the initialization step but also the other steps which change the W, like update parameters, etc.
The most common errors here have to do with “order of operations” on the part of the computation involving \epsilon, the small constant that has the purpose of avoiding divide by zero problems. Note that \epsilon is in the denominator, but is not under the square root.
I am facing the same error " AssertionError: Wrong value" (already mentioned) under the update_parameters_with_adam function ! I did checked all the formulas and steps (I put ϵ out of the square root), but still can’t find the origine of the issue.
Are you sure that you clicked “Shift-Enter” directly on the function cell after you most recent change to it? If you don’t and just call the function again, it runs the old code.
Sorry, I hadn’t looked carefully enough when I wrote that first reply: your code is actually wrong. Check again the final formula. You are handling \epsilon correctly, but your code does not follow the correct formula for the rest of what is in the denominator there.
Your error may not be the same, so coping code does not help in finding out what the error is in your code. Start debugging by checking your code against the formula.
Moderator Edit: Solution Code Removed
Hello, I have checked my formula from top to bottom again and found no mistakes. Could you please help me look at it?