Week 2 emojify - training does not end!

Hi !

I have an issue with Week 2 programming assignment “Emoji_v3a”.

Although I passed all the tests until section 1.4 (even for the ‘model’ function in Exercise 2), when I run the last cell of section 1.4 ( that is supposed to train the model and learn the softmax parameters (W,b) ) the training process seems to get stuck and never reaches Epoch 100. I waited for 30+ min before interrupting the kernel. I started a new lab a few times but still got this issue.

How can I fix this ?

Thanks !

One way to see whether a process is being carried out or not, is to put a print statement just after setting “t” for “for loop” like this.

# Optimization loop
for t in range(num_iterations): # Loop over the number of iterations
    print("Epoch: " + str(t))
    for i in range(m):          # Loop over the training examples

The output will be like this…

Epoch: 0
Epoch: 0 — cost = [38.26518071 36.37003209 59.80347335 47.54529994 35.31042648]
Accuracy: 0.3484848484848485
Epoch: 1
Epoch: 2
Epoch: 3
Epoch: 4
Epoch: 5

Then, you can see what is happening, and find the next step for debugging.
100 epoch is roughly 1 minutes process. It never be more than 30 minutes process…