W2_A2_Ex-8_Shape not aligned

Hello Hamza!

You are initializing the w with the wrong shape. Check out that you implemented the Ex. 4 initialize_with_zeros correctly. If you are sure that it is correct, then check that you call it with the correct argument in both Ex. 4 and Ex. 8 model.

Furthermore, you can add the below code in your model function, just after you initialize the w and b.

print(f"w shape is {w.shape}")
print(f"X_train shape is {X_train.shape}")

My output is:
w shape is (4, 1)
X_train shape is (4, 7)

Also, read this thread which discusses a similar topic.

Best,
Saif.