Initialize parameters deep

{moderator edit - solution code removed}

HELP i dont know where i am doing mistake

Hi @SHREYASH1, are you using any global variables while passing the function? Check your equations and get it replaced. Using global variables will always throw an error and a wrong output. Thanks!

The problem is that you are hard-coding the index values for layers_dims in your loop. That means you are treating all layers the same. That is wrong: each layer has a (potentially) different number of neurons, right?

Note that you really went out of your way to also break the code that they gave you in the template. The assertions there showed you the correct way to index layers_dims, but you rewrote them to match your incorrect implementation of the rest of the loop.

If you want to get a clean copy of the notebook to see what the original logic was, there is a topic about that on the FAQ Thread.

Note that there is an important “meta” lesson there: If the testing code they give you fails, the solution is not to change the tests. It is to figure out why your code does not pass the tests. :nerd_face:

sorry for late reply i am new on this platform so just checked it now pls tell me where i am doing mistake

I already gave you the answer. Please read my earlier reply again. Your best bet is to get a clean copy of the notebook and compare the assertions that were given to you with the way you have modified them. Your way is wrong and it mirrors the error you made in the real code.