W_4 AS_5_ L-layer Neural Network

I am facing an error. I try many times, but I did not solve.
Please tell me, how to solve this type of error.

Hi @Rakesh_Kumar11,

The error said “too many values to unpack (expected 2)”.

It expected 2 because there were 2 variable on the left hand sign of the = sign.
image

It said “too many values to unpack” because your L_layer_model function is returning less than 2 variables. Note the the exercise templated provided to us expects you to return the following 2 variables, so make sure you do what you are asked to :wink:

image

Cheers,
Raymond

As Raymond says, the error message is about as clear as you could hope for here. Also note that the return statement was provided to you in the template code and did not need to be changed. If you want to get a clean copy of the notebook in case there was other such accidental damage, there’s a topic about how to do that on the DLS FAQ thread.

Changing the definitions of any of the graded functions is a big mistake, even if you go through and make your changes consistent everywhere within the notebook. The simple reason is that you can’t change the grader and it expects the given definitions. :nerd_face: