C2_W1_Assignment Execise4

you have not assigned any index shape to the omega array.

also move the query to the right category of specialisation, course and week

You have filed this under the generic category of AI Discussions, so we can’t tell which course you are asking about. Please use the little “edit pencil” to move it to the correct course.

Fortunately I think I recognize that code as being from M4ML Course 2 Week 1 assignment.

I think there is a bug in how you are calling “grad” in the dLdOmega_of_omega_array function. The argument to grad should not be L_of_omega_array: it should be a function. You take the gradient of a function, not of an array.

could you please tell me how to do that?

I believe L_of_omega_array is function.

Oh, sorry, you’re right. Well that is not what I passed as the argument to grad and I did not get the error that you show. And if I pass L_of_omega_array in that position, I get exactly the error you show.

image
That’s not the correct argument to pass.

1 Like

Thank you Deepti!

thank you for recreating the issue and your guidance.

Thank you for the help!