Course 4 Week 1 Assignment 1: 'conv_forward_test not defined', 'pool_forward_test' is not defined

Everything you said up to the point of the above quote sounded pretty complete and correct. But I’m not sure I understand what you mean by the above paragraph. Do you mean that previously when you first started having this problem you had downloaded the notebook, worked on it with Colab and then re-uploaded it back to Coursera? Or do you mean that is what you did just now as part of the “get a new copy” procedure? If the latter is what you meant, then yes, I think that is exactly the mistake that would cause this type of problem.

There should be no reason to involve Colab in any of this: just do everything on the Coursera website.

The one part of the procedure that you don’t actually describe is how you got from the new fresh clean copy of the notebook to the one that has your solution code in it. The key point is that you must not rename the old failing notebook back to the standard name, since that defeats the whole purpose here of getting rid of polluted metadata from Colab. You just open the new fresh copy in one browser tab, open the bad renamed copy in a different browser tab, and then very carefully just “copy/paste” only your solution code in the “YOUR CODE HERE” sections into the clean copy. Then Save and Submit the new copy that now has your solution code in it.

Thank you for your time, and I apologize for my lack of proficiency in English.

when I submitted the assignment for the first time, I wrote the code only in the Coursera Jupyter environment.

I did not write any new code in Google Colab. I also did not execute any cells in Google Colab.

I attempted to copy the code from the failed ipynb file to a new ipynb file. To do this, I had to open the ipynb file, and I used Google Colab for this process.

tomorrow morning, I will not use Colab, VSCode, PyCharm, or any other tools. and I will not copy the code from the failed ipynb file to a new ipynb file. I will use only the Coursera Jupyter Notebook to write the code to new ipynb.

There should be no need to use anything other than the Coursera website for this. Click “Launch Lab” from the main assignment page. That gives you a browser tab with the new clean notebook. From there, click “File → Open” and open the bad copy of the notebook that has your solution code that you renamed to save it. Now go back to the main assignment page and click “Launch Lab” again. Now you’ve got another browser tab with the clean fresh copy. Then do the “copy/paste” from the bad notebook to the fresh one. Please copy only your solution code from the “YOUR CODE HERE” sections. No need for Colab. You just have to pay careful attention to which window is the new notebook and which is the old bad one.

Do not rename the new fresh notebook: the grader only grades the “official” named notebook. That’s the one that gets opened when you click “Launch Lab”. Even if you are running a renamed copy and click “Submit” there, it grades the official copy.

Then please let us know what happens when you submit the new notebook with your code copied over.

To reinforce part of Paul’s message:

Do not open a DLS notebook in Colab. That’s very likely to mangle the metadata that the grader uses. If you copy the code out from Colab, you could get the bad metadata with it.

1 Like

I changed the name of the bad notebook and put it in the right tab.
And, I put my new notebook on the left tab.

I carefully copied and executed the codes from the bad notebook on the right tab to the part where the code needs to be written on the new notebook on the left tab.

The result of the execution still shows the same error message.

Would it be helpful to try running it on a different laptop in your family that has never been used for development?

If you copy-and-paste the code, without using a text-only paste, you very likely could have also copied in any defective metadata.

Everything is executing on the Coursera website, not on your laptop, so that won’t make a difference. It is time to look at your notebook. I am only on my phone right now, but will send detailed instructions in 3 hours or so.

Well, I guess one possibility is that this is some kind of IT problem caused by A/V software or a firewall or proxy on your local network. So maybe you’d see different behavior if you tried it from a different computer or (better yet) a different network.

I just sent you a DM (Direct Message) about how to share the notebook with the mentors, so please have a look at that.

The problem is that your version of the notebook is old. The test functions have been changed. Here are the calls in that test cell in my current notebook:

conv_forward_test_1(z_mean, z_0_2_1, cache_0_1_2_3)
conv_forward_test_2(conv_forward)

So how did that happen? And why didn’t the “Get Latest Version” procedure fix that? You can’t just rename your old notebook back to the standard name.

And I hope that the original cause of this issue is not that you are copying someone else’s solution here. That doesn’t work, because the assignments change over time. Just grabbing something from GitHub doesn’t work.

I guess the other possibility here is that you are somehow in an old version of the course. Did you subscribe through your school or company or directly through Coursera?