Cos_Fi
July 10, 2023, 12:32am
1
I have tried both X.shape[0], Y.shape[0]; and np.size(X,0), np.size(Y,0), for n_x and n_y. The code still produces an error: Assertion Error when I run:

nn_model(X_multi_norm, Y_multi_norm, num_iterations=100, print_cost=True)

I have restarted and run the code many times.

Please help.
Thank you.

Does it give error about the matrix sizes?

Cos_Fi
July 10, 2023, 2:07am
3

Please see attached image.
And thank you for your help.

It appears that your function `initialize_parameters`

does not initialize `W`

in the correct shape.

Cos_Fi
July 10, 2023, 2:02pm
5
Thank you Yagmur_Gulec and Mujassim_Jamal.
It works now - had to tweak the initialization phase.
Many thanks.