When creating a post, please add:
Hello, I’m doing the Advanced Learning Algorithms course, and am trying to submit the final lab for week 1. Both graded questions seem to have the correct output. My second question is passing unit tests, and everything seems to be fine in the notebook but for some reason the function itself is being failed due to a name error for the function. i.e.: “Can’t compile the student’s code. Error: NameError”.
Here is the link to the lab: Coursera | Online Courses & Credentials From Top Educators. Join for Free | Coursera
Here is the beginning of the error: error: Cell #11 . Can’t compile the student’s code. Error: NameError(“name ‘my_dense’ is not defined”)
Traceback (most recent call last):
And here is my function with the answer blotted out:
1 Like
TMosh
February 22, 2024, 7:21pm
2
I believe the problem may be that you have deleted the indentation on the ### START CODE HERE ### and ### END CODE HERE ### lines.
When the grader parses your notebook in order to create its copy for grading, the lack of indention may cause it to break.
2 Likes
Thank you for your reply. That’s what I originally thought, I just tried it again with the indentation added, and I’m getting the same issue.
1 Like
TMosh
February 23, 2024, 6:14pm
4
Please post a screen capture image (not a text copy-and-paste) that shows the context of the entire error message.
1 Like
TMosh
February 23, 2024, 7:08pm
6
Are you running the notebook locally, or are you using Coursera Labs?
1 Like
TMosh
February 23, 2024, 7:11pm
8
Have you renamed your notebook file? That makes the grader unhappy.
TMosh
February 23, 2024, 8:07pm
10
Update for those who find this thread later:
Tip:
Do not move cells within the notebook.
1 Like