Getting an error message “2 Tests passed 1 Tests failed” when running my code for exercise 4. Checked prior errors that others had at this point (in 2021) but no hint at resolutions were posted except “check your formulas”. I have done so multiple times but do not see anything incorrect and the dimensionality of my variables (W, b, vdW and vdb) appear to be correct.
Any guidance / assitance would be appreciated.
V
Here is my output…
W1 =
[[ 1.63312395 -0.61217855 -0.5339999 ]
[-1.06196243 0.85396039 -2.3105546 ]]
b1 =
[[ 1.73978682]
[-0.77021546]]
W2 =
[[ 0.32587637 -0.24814147]
[ 1.47146563 -2.05746183]
[-0.32772076 -0.37713775]]
b2 =
[[ 1.13773698]
[-1.09301954]
[-0.16397615]]
v["dW1"] =
[[-0.08778584 0.00422137 0.05828152]
[-0.11006192 0.11447237 0.09015907]]
v["db1"] =
[[0.05024943]
[0.09008559]]
v["dW2"] =
[[-0.06837279 -0.01228902]
[-0.09357694 -0.02678881]
[ 0.05303555 -0.06916608]]
v["db2"] = v[[-0.03967535]
[-0.06871727]
[-0.08452056]]
2 Tests passed
1 Tests failed
Nevermind… it was a typo in my code. I was misreading (and assuming) the appropriate formulas, thinking about a prior, similar formula. So I did need to ‘check my formulas’ and use the guide formulas provided.
V
4 Likes
It’s great to hear that you found the solution under your own power. Nice work! Note that the two tests that you passed are for the type and shape of your answers, then they check the actual values as the third test. They frequently structure the tests that way.
The most common problem on this assignment is handling the \epsilon in the Adam case: it is in the denominator, but not under the square root. But that’s not an issue in the momentum case …
3 Likes