I have completed the code for the rnn_backward exercise; however, when I run the cell the following happens:
I printed cache’s content for more clarity. Does anyone know why this happens?
I have completed the code for the rnn_backward exercise; however, when I run the cell the following happens:
I printed cache’s content for more clarity. Does anyone know why this happens?
Please see the test code. In here “caches_tmp
” which is passed to your “rnn_backward()
” as "caches"
is created by your "rnn_forward()"
a_tmp, y_tmp, caches_tmp = rnn_forward(x_tmp, a0_tmp, parameters_tmp)
da_tmp = np.random.randn(5, 10, 4)
gradients_tmp = rnn_backward(da_tmp, caches_tmp)
"None"
in cache should not happen. The parameters passed are quite similar to the unit test for "rnn_forward()"
, but, you may want to check the output of your "rnn_forward()"
, and see why "None"
is inserted.