Operands could not be broadcast together with shapes (2,1460) (1,2)

Hello I’m getting the expected output in the lab but,
while submitting it is showing this error

There was a problem compiling the code from your notebook. Details:
operands could not be broadcast together with shapes (2,1460) (1,2)

can anyone help me to figure it out

Hi @Aakash_Beri ,

In the function initialize_parameters() where w is created, check the parameters pass to the random generator. It should be n_y, n_x, giving w with shape (1246, 2)

yes sir,
in that respective function the parameters passed to the random generator are n_y and n_x.
still the error is not fixed

Hi @Aakash_Beri ,

To calculate Z, we are doing an array multiplication, so it is the @ operator, the dot product operation. The * is an elementwise multiplication operation.

Z = W@X +b

Here is a link to the reference menu.

Thank you sir
The reference menu is highly useful and fixed my error
Thank you.