Planar_data_classification_with_one_hidden_layer

The nn_model function definition is compiling without showing any error but when I am executing the code block it is showing the error UnboundLocalError: local variable ‘parameters’ referenced before assignment and I am unable to debug it.

Hi @Avi, have you initialized the parameters variable inside the nn_model function? It doesn’t seem you have done it because that’s what is missing where you have the error. In the original notebook you have:

    # Initialize parameters
    #(≈ 1 line of code)
    # parameters = ...
    # YOUR CODE STARTS HERE

I had forgotten to initialize the parameters variable in the nn_model function. @albertovilla Thank you for helping me.