Grader output error

I have the same problem with my assignment , the grade dosen’t change ,though the codes work and gives the correct Expected output !!
please tell me what can I do??

There are lots of ways to pass the tests in the notebook, but fail the grader. E.g. writing code that is not general (hard-coding dimensions or referencing global variables within the scope of your functions).

Let’s start by getting a bit more detail about what the grader says. What score to you get? Is there anything under “Show grader output”? If so, please post a screenshot of that.

1 Like

That is not a failure of the grader: that is a failure of that test in the notebook. So your two_layer_model code does not return the correct return values. Did you copy that solution from github? If so, you may have gotten an old version of the notebook. They changed the way this works in April 2021, so solutions from before that don’t work.

Please carefully compare your return statement to what is expected there. If you want to get a clean copy of the notebook to see how that code was given to you, there is a topic about that on the DLS FAQ Thread.

Did that test fail when you ran it in the notebook as opposed to the grader? Note that the logic that manages the return values from the two_layer_model function was just given to you in the template code and there should have been no reason to change it.