Doubt on Optional Lab: Cost Function

Hello, I am not able to see any of the plots in the optional lab when running the code. What should I do? Can someone help me? Should I edit the codes already written there?

Hello @SambitSatapathy

Are you running the lab on the coursera platform, or did you download it to your own computer?

Which web browser are you using?


I cannot understand the deep technicality behind the gradient descent and the cost function algorithm. Please help me with that.

Hello @rmwkwok

i am running it in the coursera platform itself, and i am using firefox

1 Like

Thanks @SambitSatapathy. From coursera’s help page, the latest version of firefox is supposed to be supported, however, it also said Chrome is the recommended one.


Although you might write to coursera about your case, it probably wouldn’t be faster than testing it on Chrome. I am using Chrome and I have not experienced that problem. Do you have Chrome installed in any of your devices that you could use to test?

Moreover, when you test it again, please try two different labs, and make sure to run all the code cells from top to bottom.


Hey @rmwkwok

I tried running it again after restarting the browser and now the issue is resolved.

But I don’t understand how to get the intuition of the code because I think the functions soup_bowl() and plt.intuition() are alias created by Andrew. Where can I learn those? So that I can try out some codes myself.
Can you help me?

Hello @SambitSatapathy,

Every lab uses some helper functions and they can be found in python script files. In the lab, if you click “File” > “Open”, you will see a file browser and there lists the lab itself, all the script files, and (if any) data files. For example, those two functions are in a script file called “”.

Those two functions use matplotlib to generate plots. Note that this course does not teach matplotlib, but you might find these tutorials useful.


I am sorry @SambitSatapathy, but I want to just write one reply to another learner who asked another question in this thread.

Hello @Avinaba_Ghosh, I recommend you to go over the Course 1 Week 1 lectures again. There are videos specifically for gradient descent and cost function. After you watch the videos, if you have any specific questions about any specific content of the videos, please ask the specific questions and share with us which timestamps in which videos are the content from.

Please ask your questions by opening new threads.