Optional Lab Gradient Descent

When I try to run the code in the optional lab of " Gradient Descent" all of the codes when running results into error. how can I restore the lab to its orginial setting and default. I closed the window several times and reopend i, but there is no change in appearing the error.

Yes check out this article on how to reset the notebook:


Although I restarted and cleared the output through the Kernel heading, the problem still exists.

This relates to Lab 04, gradient descent.

Make sure you run all the cells in the notebook, also you need to perform a force refresh to reset the notebook.

I ran all the cells, but still facing the same error as before. Moreover, I added “?forceRefresh=true” to refresh my LAB 04, but even after refreshing, I face the same problem. Whatever I do, the errors remain the same

Hi @Hossein_Bolouri,

Can you share a screenshot like the following one:

The key features of the above screenshot are:

  1. it shows compute_gradient, which means this cell defines the function. This is important because your error message said it was not defined.

  2. In [4] means the cell has been run.

  3. ln[5] means the cell has been run right after the previous cell. Note that the number is incremented by 1. It is OK if your numbers are different but the key is, the second cell’s number is larger than the first cell’s by one.

  4. It is empty between the two cells, meaning that the first cell was run successfully without any error triggered. If there was a trigger, it might not have been defined compute_gradient successfully and thus the error you saw.

Share with us a screenshot like that, please.


Thank you, my problem was solved.