Deeplearning Course 5 Week 1 Jazz - LSTM parameters

In the Jazz solo assignment, after building the model, i can see that the Parameters for the mode shown in summary(model) says LSTM has (None, 39680) parameters.

By calculating the dimensions of a and c I’m unable to come to that number.

Any explanation ?


Hi @salih-g ,


According to the above formula of LSTM, you can see the parameters include Wc, bc, Wu, bu, Wf, bf, and Wo, bo.
The shape of bias terms (bc, bu, bf, bo) is (n_a, 1), weight terms (Wc, Wu, Wf, Wo) is (n_a, n_a+n_x).
In the exercise, n_a = 64, n_x = 90. As a result, the number of LSTM parameters is (64*(64+90)+64) * 4 = 39680

1 Like