C1 W3 perceptron model returns <class 'NoneType'>

Interesting. I took another look at your code (I reformatted it with the </> tool to make it legible). You can still see it if you click the little pencil icon (at least I can still see it). It does look legitimate and I don’t see any indentation anomalies or the like. The only theory I can come up with is that there is something structural wrong with your notebook or perhaps there are some invisible characters in the first few lines of the cell that are ignored in the Jupyter execution context, but not in the grader context. I’m not an M4ML mentor and don’t have access to the course, so I wouldn’t really be able to do anything if I could get a copy of your notebook. Since none of the M4ML mentors have chimed in, the only thing I can think of to try would be to get a clean copy of the notebook and then very carefully “copy/paste” over just your solution code from the “YOUR CODE HERE” sections and see if that helps.

Here’s a thread that explains how to get a clean copy. It’s from DLS, but the notebook mechanisms are the same in all the courses.

If you go that route, please let us know if that helps or not.

1 Like