C1_W3_Assignment problem in lab

I have the problem as shown in the picture, my Exercises after running the test are all “All the test pass”. But the system didn’t give me a grade even though I submitted it many times. Hope everyone can help me!!

1 Like

Check n_x as in the notebook said that you didn’t defined

1 Like

I have already determined n_x but it doesn’t work. This is my note book file, please take a look

{moderator edit: code removed}

1 Like

Here is one significant issue in your code:

You are expected to use the compute_cost() function here.

As you wrote the code, what determines the value of ‘m’? That’s why you need to use the compute_cost() function.

= = = = =

In the future, please do not post your code on the forum. That’s not allowed by the Code of Conduct.

If a mentor needs to see your code, we will contact you with instructions.

When I tested your notebook with the grader, I found some interesting issues:

  1. When I submitted your notebook I got a warning message that your notebook is out-of date:
    image

I verified this by checking your notebook metadata, and your notebook is out of date (the grader expects version 2, yours is version 1).

However, when I looked at your code to understand this, I found that your code does have one of the changes that are is in version 2 (the number of arguments to the forward_propagation() function).

So it appears you have modified the notebook to include one of the version 2 changes, but you did not actually get a complete copy of the version 2 notebook.

  1. I was not able to duplicate the grader issue you have with an error in the n_x variable.

Can you provide any additional information about your notebook and the grader you’re using?

The way to get the correct notebook is to follow the procedure that is in the M4ML Resources FAQ page. You can find it by using the forum Search tool.

You also should get a fresh copy of the w3_unittest.py file.

I recommend you delete your current notebook entirely, then get a fresh copy and start over.