For the function lstm_cell_backward(da_next, dc_next, cache), I tried to calculate da_prev by using
“np.dot(Wf[:, :n_a].T, dft) + np.dot(Wc[:, :n_a].T, dcct) + np.dot(Wi[:, :n_a].T, dit) + np.dot(Wo[:, :n_a].T, dot)” but it shows an error that “The name Wf is not defined”. I cannot resolve this issue can anybody help me?
I also tried using dWf but its giving me an incorrect output.

The variable should be dWf, not Wf.
dwf is the gradient of the weight matrix of the forget gate with respect to time step t, computed with equation 11.

Hello Michael,
I resolved that error. Unpack the values “Wf, Wi, Wc, Wo” from parameters before you use these values.
For e.g. Wf = parameters[“Wf”]
This worked for me