While defining the parameters, like W, you are using explicit values, like (4, 2). Have you tried using instead the parameters passed to the function, namely n_x , n_h, and n_y?
IMPORTANT: Please delete your code - publishing code is against the code of conduct of the community. Thank you!
@Juan_Olano@Rashmi , thank you for your reply. It works now. What I did, was I just used one part of the cost formula because only one part is given in the instructions code.
I am glad it worked. Now, the instructions are not given with the entire solution but with parts or hints… but the instructions at the top are clearly showing the formula that needs to be implemented
@Juan_Olano Hi, Rashmi’s hint was for Excercise 5. But I am now working on Exercise 8. Here, it is asked to initialize parameters. Which should be a one-line code.
Ah! you are right … so here the key is to pass the appropriate parameters to the function that inits the parameters. If you scroll up to the definition of the function that inits the params, you’ll be able to verify the signature needed on this function, that is, the parameters that you need to pass. I think that if you nail this down, you’ll be good to go, unless there’s any other issue in the ‘for’ loop below. Try that and let me know.
… and let me move ahead of the game here. In the for-loop, the instructions will indicate that you’ll have to call the functions you’ve already developed above, in the order and with the params indicated with the instructions. So just be careful in selecting the appropriate function on each step, and passing to them the right params, for which you can always scroll up and review the params needed by each one of these functions.