DLS issue in running C4_W4_Assignment2 on local machine

I could never run the complete notebook on Coursera since the kernel kept terminating in Ex6. So, I downloaded the whole assignment to run locally to test my code.

However, when running on the local machine, my gram_matrix function failed with the wrong values even though it passed when running in Coursera’s lab environment.

This is the output I got when running the notebook on my local machine.

Please help. Thanks a lot!

You will need to have the same versions of the libraries and frameworks used by Coursera. Please read this guide for the local machine and this for Colab.

Hi @Ginny_Khue_Dang,

This can mean that there can something be possibly wrong with your code. And if so, even if you run the assignment locally (which is only recommended after you passed the assignment in the coursera environment), you could still possibly fail the autograder.

Hi @Mubsi, I thought this issue is because of resource issue, isn’t it?

It is.
So imagine, you are writing code which could be exceeding that resource on Coursera, but will work on your local, because essentially you have a lot more resource on your local. When you’ll put the assignment back on Coursera for grading, it still has to run in that limited resource for grading, hence, the code could fail.

Thanks @Mubsi and @saifkhanengr, for your advice. So, I figured out that my code was wrong, which made the notebook run out of memory and stuck after executing cell 26. I changed my code and reran the whole notebook. I got better results and no issues throughout the assignment. Unfortunately, when I submitted my revised notebook, I got this vague feedback: Sorry, your submission was incorrect. Please try again. Expecting value: line 1 column 1 (char 0) I am not sure what to do. Please advise. Thanks

Maybe your notebook name is not the same as Auto Grader expects. Grading system checks files with specific names. What is your notebook name?

I didn’t change the notebook name at all, and it currently is Art_Generation_with_Neural_Style_Transfer

I tried submitting my assignment again, and it worked well. The issue is resolved now. Thanks for your help!