Please do not share your code on the forum. That’s not allowed by the Code of Conduct. If a mentor needs to see your code, we’ll contact you with instructions.
I’ll edit your post to remove the code, and have another reply later with some recommendations.
Have you hit “Shift-Enter” on the function cell after you changed it to fix that bug? If you don’t, then it runs the old code again. Just typing new code does nothing until you execute that cell and calling it does not count as executing it.
It’s surprising that you’ve gotten all the way to C5 without tripping over this before. You can easily demonstrate this behavior to yourself:
Take a function that works correctly and then intentionally break it by multiplying the return value by 2. Now run the test cell again that calls that function: it still works, right? Now click “Shift-Enter” on the newly broken cell and then run the test again. Kaboom!
I have repeatedly tried to hit Shift-Enter. Also, I have reloaded the Jupyter-Notebook. The error still persists.
(I also have tested with another function to break it and correct it again. In this case the notebook behaves normal, i.e. it is working as it should).
Interesting. Well that incorrect code must have been something that you typed at some point. If it no longer looks that way and you’ve done
Kernel → Restart and Clear Output
Cell → Run All
and still see that error, then I don’t really know what would cause that. I can only speculate that something must be structurally wrong with your notebook. I’ll send you a DM about how to proceed.
To close the loop on the public thread, it turned out that the test cell for lstm_cell_forward had been modified to create that bug. In a lot of the assignments, the test cells are purposely made not editable to avoid this type of problem, but for some reason they elected not to do that here.
Just as a matter of general principles, if the tests fail, the solution is not to change the tests. There can be cases in which you want or need to perform some experiments that involve changing the tests. In that case, the recommended method is to make a copy of the test cell and modify that, not the original. Then delete your experimental cell when you’ve accomplished what you set out to investigate, because adding cells to notebooks can sometimes confuse the grader.