I am stuck with the first part of the second week2 assignment. I have completed the Emojifier-V1 model code and all tests are passed. When executing cell 14 where the model is trained, I get a firs epoch finished after some minutes and then even after half an hour nothing else happens. I ran the notebook locally as well. There the output is still very slow but at least finishes. I already checked multiple times if I accidentally introduced some inefficiencies. But tother than the for loops which are outside of the sections that are for editing, I cannot find anything. Does anyone else experience such problems?
I ran this and all 50 epochs were completed in 10 or 20 seconds. Maybe you have changed some other code mistakenly. Here is the guide to get a clean copy of your assignment.
@TMosh: No I have no print() statements in this section.
I waited over an hour and eventually the cell finished and I was able to continue. The speed of the rest was quite ok and I was able to finish the assignment successfully (obviously the grader did its job much faster). So it is no more a blocker for me but I wonder why this is sooooo slow.
Maybe I try to follow the guide for a clean copy and repeat assignment to see if it happens again.
OK found it. I mad a bad mistake in sentence_to_avg() in the initialization of avg. I converted it to a list before accessing the shape. I found it by printing executions times and saw that the execution of sentence_to_avg() took much longer during the training compared to the test in the cell before. And this is because the map is much larger.
The hint with resetting the notebook helped me to figure that out. Many thanks!