W1A1 Help Needed with Assignment!

Can someone please sort this error for me? Everything except y_pred is working fine!

{moderator edit - solution code removed}

Have you taken any of the earlier DLS courses or is this your first one? I would have expected you would be familiar with the rules here: you can’t just post your code and say “please fix it for me”. We are not allowed to share code publicly. If the mentors can’t figure out how to help by other means, we’ll ask to see your code privately (by DM).

So the first step when you have an error is to show the error output you get. Sometimes that will reveal a little source code if it’s an exception trace, but that’s ok.

In your case, I’d say the code looks ok, though. Are you sure your rnn_cell_forward code is correct? One other thing to try is:

Kernel -> Restart and Clear Output
Cell -> Run All Above

Then run the test cell for rnn_forward again. This is just to make sure that the state of your notebook is consistent before we go to the next level of investigation.

Hello Sir!
I apologize for this mistake, this is the first time I am using this platform. I’ll take note of the rules and regulations.
I apologize once again.

I tried as you had instructed in the previous post, but to no avail, I am still getting an error in rnn_forward.
As far as rnn_cell_forward is concerned, all tests are being passed.
Here is the snippet of the error output:-

Just to close the loop here on the public thread:

I had a private conversation with @hriday_m and it turns out the bug is in rnn_cell_forward, but the test cases in the notebook are flawed and do not catch the bug. It is the same bug described on this other thread from today.

I was able to find the bug in the test logic and have filed a github issue with the course staff. I hope they will be able to fix it soon. The test fix is not difficult.