C1_W4_Assignment Problem

Hi, so Im gettin a problem with my activity.


Ive tried to contact deeplearning and no one answers, also use the notify problem and do not get an answer.

One of the problems was this

The Matrix is inverted but essentially is the asked matrix and im getting wrong that answer. Now i cant even get a grade because all bugged. I cannot even get a new template.

1 Like

That error means that the grader can’t even check your functions because of some sort of syntax error or other “structural” problem in your notebook. One thing that can cause that is the generated output of running your functions, so the first thing to try is these steps:

  1. Kernel → Restart and Clear Output
  2. Save
  3. Submit

The point is that the grader does not need to see the output of running your notebook: it only needs to call your functions with test cases. In some cases, the generated output can contain text that confuses the grader, so the above process submits the notebook without any of your generated output, just your code.

If that still doesn’t work, then the next thing to try is getting a fresh copy and then carefully “copy/pasting” over just your code from the “YOUR CODE HERE” sections to the clean copy. If you can’t get a fresh copy, that most likely means you did not read the instructions carefully enough: you have to move your existing copy out of the way first. The “refresh” procedure will not overwrite existing files, so start by doing a “Rename” of your existing notebook. Here’s a thread which goes through the process in full detail with explanations.

If even the clean copy doesn’t help, then we’ll go to “Plan B” and need to actually look at your code.

1 Like

Thanks for the reply. I have runned all the functions and they all pass the unit test. I have now restart and clear output and still get


In the screenshot its seen how the unit tests work.

1 Like

They give you instructions in the comments and in the instructions. The point is that increasing values of cosine similarity indicate decreasing distance. So if we sort by cosine similarity, then the list ends up in the reverse order and gives us farthest first and nearest last. You need to reverse the list before peeling off the requested number of values.

If I make the mistake that you show, then the code does not pass the tests in the notebook for UNQ_C9. Did you fix that problem?

1 Like

In the notebook all the tests pass, but when sending the activity, I get an error with all the functions, my notebook ID is vnlppqimkxks