Hi, I’ve been trying to track down what could be hard-copied from the Step-by-Step code. However, in trying to flush this out, I’ve noticed a peculiarity with the first part of the 2nd assignment for two_layer_model_test(two_layer_model)
. First, let me display the decline in costs from the plot of the two_layer_model
stats:
As you can see, it gets the right costs to very high precision over 2500 iterations, which should be good, right? That should only be possible for non-trivial code given the unique seed for generating random elements.
But, I find a change in dimensions from just after iteration 0:
where W1,b1,W2,b2
= {[7,12288],[7,1],[1,7],[1,1]} becomes {[4,10],[4,1],[1,4],[1,1]}, which of course is from the first assignment test. I mean, I can see the code, and it’s doing exactly what it should for this test case. Also, the corresponding weights and biases are not in the two_layer_model_test
.
But the test results for W1,b1,W2,b2
do match on the 2nd pass of iteration 1:
And this is just for the two_layer_model
.
For the L_layer_model
. I can’t even display the weights and biases because the L_layer_model
is initialized with layers_dims = [12288, 20, 7, 5, 1]
for the 4-layer model, which is then changed to a 3-layer model with layers_dims = (10, 5, 6 , 1)
in L_layer_model_test(L_layer_model)
.
Whatever is causing this behavior will be illuminating as I progress through the courses.