W3_A1 nn_model() same cost value


Hello I am Ishan
Week 3 Assignment 1 Cost does not change in nn_model() function.Can anyone help me to fix the issue?

If the cost never decreases, there are a few possiblities:

  • Does your backward_propagation() function work correctly and pass all its
    tests? If the gradients are wrong, there won’t be any learning, and the cost will never change.

  • Does your update_parameters() function work correctly? If the gradients aren’t applied to the weights correctly, then there won’t be any learning, and the cost will never change.

  • Does your nn_model() function call the forward_propagation(), compute_cost(), backward_propagation(), and update_parameters() functions correctly, and pass all of its tests?

  • Do any of your functions wrongly re-initialize the weights to zero?

1 Like

All the test cases of the previous exercises passed.
I checked all the functions but i couldn’t find a mistake…

Passing the test cases does not prove your code is perfect.

I have been struggling for hours by changing the functions also nothing could help me to fix the issue

For those who find this thread later:

The issue was a typo in the “parameters” variable name in nn_model().

1 Like