C2_W1 first assignment: No module named 'init_utils'

Hi everyone!
I’m new to python and trying to implement the whole first C2 W1 assignment in spyder, but I get stuck when trying to run the line:

from init_utils import sigmoid, relu, compute_loss, forward_propagation, backward_propagation

I get the following message:

No module named ‘init_utils’

Does anyone know how to solve this?

The point is that you need more than just the notebook if you want to run the code in a different environment. Why not just use the course website?

If you want to run it elsewhere you need to download all the files associated with the assignments. There are no official instructions for how to run under spyder or PyCharm or VSCode or Google Colab or name your favorite environment, but there is a topic on the DLS FAQ Thread about how to download all the files.

Because I was trying to challenge myself a bit, maybe I can try to write the functions myself.
Anyway, got it, thanks a lot!

The functions are there in the assignment in a file called init_utils.py. You just need to download it. There is also a topic on the FAQ Thread about how to find the utility files if you just want to look at them as well.

1 Like