The first thing to try is: Restart the kernel and clear all the output - then run all of the cells again.
Then look closely at every output cell, and see if there are any error messages.
In fact, I did what you proposed before I posted this question. My problem has been solved. It was just because there is a ‘\n’ right after one of the comment lines. There’s no syntax error in the code implementation. I think the grading system is a bit rigid.
I restarted the kernel and clear the outputs but I keep getting the same error (and 0 points). In an earlier version of my submission, I had created a cell (cell 10) to simply look at the model weights. I have now deleted that cell though, rerun the kernel and submitted again. Still getting the same error.
Hi, @MaxAB! Are you sure you’ve done “Cell → Run All” in your notebook and then gone through carefully to make sure none of the cells are throwing any errors?
If your notebook “runs cleanly” as it stands, but the grader throws that type of error, then the other thing to wonder is whether you’ve just accidentally corrupted some structure that the grader depends on. One experiment worth trying would be to get a clean copy of the notebook and then very carefully just “copy/paste” over your completed solution code and see if that helps. There is a topic about how to do that on the FAQ Thread.
Hi Thanks for the tip - I think the corrupted structure was the issue. I deleted a cell that I had inserted myself and afterwards I was able to submit (somehow a couple of days ago the same trick didn’t work). Thanks!