C2_W1_Lab03_CoffeeRoasting_Numpy errors?

Folks I’m looking at the optional lab named C2_W1_Lab03_CoffeeRoasting_Numpy in the Advanced Learning Algorithms course in DeepLearning.AI. Maybe it’s only me but the 10th code window that runs predictions, e.g., predictions = my_predict(X_tstn, W1_tmp, b1_tmp, W2_tmp, b2_tmp), throws an error shown here: NameError: name ‘W2_tmp’ is not defined. This is the first time lab code (other than code I have written) has not run. Have others run into this issue? What’s the best practice here? Any thoughts are appreciated.

1 Like

It could be probably related to cell where W2_tmp was recalled or defined which you have not run the cell. Basically check if you have run all the previous cell before the cell which has predictions recall.

I agree, and yes, I restarted the kernel and ran all the code from start to finish and still got the error. My review of the code, if it can be trusted, says a couple variables were never created in the code, but I have been wrong before. Still wondering if it is common to have eŕors in lab prepackaged lab code.

1 Like

It is ungraded lab, so you can share screenshot of the error and codes here.

You posted in “AI Questions”, which is not intended for questions about specific courses.

I’ll move your thread to the correct location (Machine Learning Specialization, Advanced Learning Algorithms, and add the “week-1” tag).

I have not had any issues with this lab (nor have any been reported on the forum).

1 Like

Thanks for that clarification, Tom. I decided to reload the lab and found that the original lab (unchanged) worked fine. I must have changed the lab code somehow through some fat finger move that I don’t remember making. The manual refresh solved the problem. Thanks for your help.

2 Likes