C2_W3 assignment N_Y dimension problem (it seems to be a problem with the unitest)

The size of the input layer is: n_x = 2
The size of the hidden layer is: n_h = 2
The size of the output layer is: n_y = 1

Expected Output
The size of the input layer is: n_x = 2
The size of the hidden layer is: n_h = 2
The size of the output layer is: n_y = 1

In [23]:

w3_unittest.test_layer_sizes(layer_sizes)

Test case “extra_check”. Wrong size of the output layer n_y for the test case, where array Y has a shape (3, 100).
Expected: 3.
Got: 1.

5 Tests passed
1 Tests failed

Did anyone have this issue where n_y output layer should be (1xm), but the unitest expected (3x100)?

I have passed the initial test as indicated but failed the “extra check”.

One of the ways this type of error can occur is if the dimensions are hard coded in your implementation. Then it will only pass when the test case matches your hard coded dimensions. Look for an opportunity to use a parameter instead.

Thank you! I will try it.