Total number of weights in LSTM N/W = 4 x inp_dim x (inp_dim + out_dim + 1)
So, in your first model:
For Stage-1(input --> h1):
inp_dim = 39; out_dim = 1024
Therefore, weights of stage-1 = 4 x 39 x (39 + 1024 + 1) = 0.165M
For Stage-2(h1 --> h2):
inp_dim = 1024; out_dim = 1024
Therefore, weights of stage-2 = 4 x 1024 x (1024 + 1024 + 1) = 8.392M
For Stage-3(h2 --> h3):
inp_dim = 1024; out_dim = 1024
Therefore, weights of stage-3 = 4 x 1024 x (1024 + 1024 + 1) = 8.392M
For Stage-4(h3 --> output):
inp_dim = 1024; out_dim = 34
Therefore, weights of stage-4 = 4 x 1024 x (1024 + 34 + 1) = 4.337M
Thus, total weights = 0.165M + 8.392M + 8.392M + 4.337M = 21.2M (approx)
And, in your second model:
For Stage-1(input --> h1):
inp_dim = 205; out_dim = 700
Therefore, weights of stage-1 = 4 x 205 x (205 + 700 + 1) = 0.742M
For Stage-2(h1 --> h2):
inp_dim = 700; out_dim = 700
Therefore, weights of stage-2 = 4 x 700 x (700 + 700 + 1) = 3.922M
For Stage-3(h2 --> h3):
inp_dim = 700; out_dim = 700
Therefore, weights of stage-3 = 4 x 700 x (700 + 700 + 1) = 3.922M
For Stage-4(h3 --> h4):
inp_dim = 700; out_dim = 700
Therefore, weights of stage-4 = 4 x 700 x (700 + 700 + 1) = 3.922M
For Stage-5(h4 --> h5):
inp_dim = 700; out_dim = 700
Therefore, weights of stage-5 = 4 x 700 x (700 + 700 + 1) = 3.922M
For Stage-6(h5 --> output):
inp_dim = 700; out_dim = 205
Therefore, weights of stage-6 = 4 x 700 x (700 + 205 + 1) = 2.536M
Thus, total weights = 0.742M + (4 x 3.922M) + 2.536M = 19M (approx)