Now it’s getting nitty-gritty.
In week 3’s programming assignment, “planar data classification with one hidden layer”, we are progressing nicely, but then in the “GRADED FUNCTION: compute_cost”, the test case fails.
And it fails apparently because “The shape of A2 is (5,)”!
More precisely. I am getting three calls which are nice and one which is nasty:
The shape of A2 is (1, 3)
The shape of Y is (1, 3)
No problem!
The shape of A2 is (1, 3)
The shape of Y is (1, 3)
No problem!
The shape of A2 is (1, 5)
The shape of Y is (1, 5)
No problem!
The shape of A2 is (5,)
The shape of Y is (1, 5)
Well, this is just garbage input.
Now the question is
- Am I at fault somehow due to bad implementation of earlier code, or
- Is the test case faulty?
Apparently nobody has complained so far, so it must be me, right?
Also, the Y
vector, which was created by load_planar_dataset()
as a matrix of shape (1,400)
containing uint8
from {0,1}
now contains booleans. I can handle that
but I was a bit surprised about that nevertheless. Am I supposed to be expecting this?
Btw, I am using print statements to STDERR with good effect, can I leave these in? Will the grader croak on those or does it just scrutinize STDOUT (that would be convenient)?
Best regards,
– David