Some questions in parameters of LSTM layer in Pytorch

In above figure, I Create a LSTM layer with input_size of 8, hidden_dim of 4 and num_layer of 1. when i print the parameters of this layer, I just find two weight and two bias. but generally, LSTM should have 4 weights and biases, and them have same size.

In addition, I try to calculate the parameters number with following fomula.
Param count = 4 * [(input_size + hidden_size) * hidden_size + hidden_size ] = 4 * [(8 + 4) * 4 + 4 ] = 208
this result is not equal to 224.

So i just wonder why that happened, Is anything wrong in my above understading.

I will very grateful if you help me.

The parameters of the nn.LSTM module are explained in the docs, where also the “packaging” of these parameters is explained.

I got it, thank you so much.