Github to assignment: tensorflow-1-public/C4/W1/assignment/C4W1_Assignment.ipynb at main · https-deeplearning-ai/tensorflow-1-public · GitHub
I get this error, even though my expected output seems to match. It’s as if the grader is not able to grade the particular function properly. What may the problem be?
I tried restarting everything by creating a new instance of the notebook, and now nothing passes. I even tried refreshing my workspace using the given instructions. However, even though I have renamed the notebook, the grader is still taking the previous one. May a mentor please help me out and take a look at my notebook. Thanks!
Notice that the names of the notebooks are different. The file to be submitted is C4W1_Assignment.ipynb, while the notebook is named C4W1_Assignment_v2
I have not taken that course, so am not familiar with that assignment. But that type of error typically is caused by writing your code in a way that is not “general”. Meaning that you pass the test case in the notebook, but the grader test case is different enough that your code fails. Ways this could happen, for example, are hard-coding assumptions about the dimensions of the input objects or referencing global variables instead of the formal parameters of the function. Please have a look at your code again with those ideas in mind and see of that sheds any light.
The mentors cannot directly see your notebook. Please click one of those grader outputs so we can see what the message is, as you did in the initial post here.
Note that if you have some kind of a syntax error, then you get 0 points for everything, because the grader can’t even run your code.
I’m sure there is no syntax error because I was initially getting 70/80. No all of a sudden I get 0/80
Well something must have not gotten transcribed correctly into the new notebook. Please click the little “right arrow” to the left of the grader heading, so that we can see what the error message is.
Here are the errors. They all seem to be the same error.
Ok, that means you missed some part of the code that needed to be filled in. There is a “None” somewhere in the notebook that you need to replace with code. Use the browser ^F search to look for None.shape
.
The first law of debugging is “believe the error message”.
This is an example of the point I mentioned earlier: you have a python syntax error somewhere in the notebook, so it can’t run any of the code. That is why you get 0 points and the same error for every function. But it’s pretty clear what you need to look for to find the source of the error.
I’m working on a refreshed version (or so I think) of the notebook as can be seen by the different name C4W1_Assignment_v2 instead of C4W1_Assignment. However, the file to be submitted is not reflecting the new name of the notebook. How do I change it so that the new notebook is being sent to the grader? Could this be the source of the 0/80 error?
Ok, so I did some fiddling around and was able to get back to the 87.5% submission instead of 0%. Not really sure how I fixed it, but I followed the steps to refresh the workspace, deleted the previous file, input my code back into the new “v2” file and renamed it back and submitted.
Now I get this error, same one as before.
I’m pretty sure I’m not doing anything wrong for train_val_split because my graphs match the expected output:
I feel like its a grader issue. May the DeepLearning.ai team have a look at this ASAP?
EDIT: not really a grader issue, but instead the way the grader is probably setup to recognize the solution. Instead of using SPLIT_TIME, use time_step in the solution.
Ok, I was able to fix it! Instead of using SPLIT_TIME, I had to use time_step. For future learners who may face the same issue where train_val_split is not passing, check out this post: This Assignment is giving me Headache, Please Look into this with me
Thank you also to paulinpaloalto for your input and having a look!
1 Like
It’s great to hear that you found the issue! One other important point that you also figured out along the way is that the grader works in a counterintuitive way: if you are working in a renamed copy of the notebook and click “Submit”, you’d expect that the grader would grade your current copy. But that’s not what it does: it only knows how to grade the “official” copy, which is the one opened by the “Work in Browser” link. So your only choice is to rename the notebook you want graded back to the standard name.