Week 4 Programming Assignment 2 - 74% Accuracy for Deep Layer?

I implemented the code for the Deep Layer section of the 2nd assignment for Week 4, but I got the result that my accuracy is 74% (the expected output is apparently 80%), and I can’t figure out what I did wrong. I submitted the notebook and it gave me 100/100, but this is bothering me. Can someone help explain how this is possible? did I do something wrong? I’ve attached the output I got.

That probably means you forgot to run the cell that redefines layers_dims to be the 4 layer network. In other words, you just duplicated the results of the two layer model, but it comes out slightly better because the initialization routine is more sophisticated.

In other words, your code is correct, as confirmed by the grader, but you ran it with the wrong input values, so you get different results.

Try running all the cells in the network in order by doing “Kernel → Restart and Clear Output” followed by “Cell → Run All” and I’ll bet you get the expected results.