# C1_W3_Assignment Ex 3

Hi,

I’m getting the below error on Ex 3. I’ve done as the instruction requested and initiated n_x and n_y as. random numbers for weight variable W (with scaled multiple) and as zeros for bias variable b.

I know the error states the shape of the arrays are incorrect, but I can’t reshape them using reshape, I just get another error telling me I can’t reshape a size 1 array. So, which is its correct shape? The first error tells me its (5,3), but the reshape error tells me it’s size is 1, not its shape

I’ve tried checking the shape of both W and b using print(f"W.shape = {W.shape}") respectively, giving (1,1) for each query.

W.shape = (1, 1)
b.shape = (1, 1)
W = [[-0.02419083]]
b = [[0.]]

when running the initialize_parameters function, the correct format for the answer is given and matches up with the format of the expected output, but I can’t understand why the test case “extra checks” are failing. The following test cases fail when running the test case function:

wrong shape of the weights matrix W
wrong shape of the bias vector b
wrong bias vector

W.shape = (1, 1)
b.shape = (1, 1)
W.shape = (5, 3)
b.shape = (5, 1)
Test case “extra_check”. Wrong shape of the weights matrix W.
Expected: (3, 5).
Got: (5, 3).
Test case “extra_check”. Wrong shape of the bias vector b.
Expected: (3, 1).
Got: (5, 1).
Test case “extra_check”. Wrong bias vector b.
Expected:
[[0.]
[0.]
[0.]]
Got:
[[0.]
[0.]
[0.]
[0.]
[0.]]
3 Tests passed
3 Tests failed

You are not supposed to initiate n_x and n_y as random variables. Just leave their values coming from the previous exercise.

Let me know if the problem persists.