Assignment 1: 'Wf is not defined'

When attempting the last optional exercises of LSTM backward pass calculating the partial derivatives and getting the gradients. Some variables are not included within the function’s definition and I am wondering if they should be.

Each of Wf, Wo, Wi, and Wc are used within the calculation of da_prev and dxt in lstm_cell_bakcward, each of these variables are supposed to used according to the way to calculate them but you can’t unless you pass in these variables made previously in the assignment. The same applies for the last exercise.

And I’m not sure how da_prevt and dc_prevt are defined.

I hope I’m able to get some help.


All the variables required for lstm_cell_backward are present in cache.
The parameters entry of the cache i.e. the last entry, contains the dictionary of weights you’re looking for.

The equations for da_prev and dc_prev are given in the markdown.