C1_W3 final lab fails to load and screen turns black

Anyone experiencing issues loading C1_W3 logistic regression final lab of the week? Mine takes forever to even reach ‘kernel starting …’ then a black screen follows. Any other browser Coursera browser tabs also turn black.

I did add print() to the function compute_gradient() and that may be the cause of the stall. How do I load the page so I can at least remove those prints? Thank you

I have never experienced this. Would you like to try rebooting your computer, open an incognito browser to login coursera, and open the lab from there? If this doesn’t work out, please let us know here.

If your print() caused a lot of output to the notebook, that could have stalled the kernel.

Avoid using print statements that can generate a lot of output.

  • Printing function inputs or return values is usually safe.
  • Printing values from inside a for-loop can cause a lot of output.

Lesson learned. I tried everything suggested and ended up just renaming and forcing a refreshing. It looks like I lost all work. Maybe that work is elsewhere but doing over the lab again for reinforcement is not a bad idea. Thank you.

I am sorry to hear that. Maybe I had missed the point in my last reply. Now I think your old notebook had contained too much printed text? That’s a probable cause. If I were you, I would download that renamed notebook, use a text editor to open it, locate the printed text and delete it there. However, you would have to be very careful not to delete useful stuff in order not to break the format of the notebook, because otherwise you couldn’t open it either.

Printing is a very helpful tool but I think Tom’s points are crucial too. I sometimes would add a “break” statement when I print things in a for loop, so it could not go out of control.

Good luck!