In section 5.1 (Train the model) when I run the first cell to train the model, I get different cost after iteration 0 (and subsequent iterations) compared to the expected output. Here is what I get:
Sometimes the outputs can differ in computation. All tests passed is indicating that you have passed the test. Once you submit to the autograder, if there will be any error, you’ll know.
Are you sure you ran all the cells of the notebook in order? It’s a common mistake to skip running the cell that redefines layers_dims to be the 4 layer network. So you’re running the L layer test, but with the two layer network. Try “Kernel → Restart and Clear Output” followed by “Cell → Run All” and see if you then get consistent results.
Thanks @paulinpaloalto! This must have been the problem. Although it surprises me because before posting here I also tried Cell > Run All Above and got the same result. But it seems restarting did the trick. Thank you!