Answer mismatch in the Exercise 8 - lstm_backward
My answers are not matching with expected answers in Exercise 8 - lstm_backward.
Shapes are right, but the values are wrong. I cannot figure out the error in the code. Please help.
My answers are not matching with expected answers in Exercise 8 - lstm_backward.
Shapes are right, but the values are wrong. I cannot figure out the error in the code. Please help.
Hmmm, yes, all the values are wrong. I’m assuming that your lstm_cell_backward code passed the tests. So the most likely thing is that you are passing incorrect arguments when you call lstm_cell_backward from lstm_backward. The hard work here is actually in lstm_cell_backward.
They don’t say much in the instructions for lstm_backward, but they suggest that you compare how things worked when you called rnn_cell_backward from rnn_backward. The first and third arguments should look the same as in that previous case, but then you’ve also got c to deal with in the second argument.
If those hints aren’t enough to help, please check your DMs for a message from me about how to proceed.
To close the loop on the public thread, the bug was really subtle and hard to spot, but there was one misplaced “close paren” in the code in lstm_cell_backward that caused the different values. The tests for lstm_cell_backward failed, but only in the dc_prev values.
Thank you sir.