Calculate number of parameters for ConvLSTM2D layer
i=512, input dimension or input channel

h=128, output dimension or output channel

k=3, kernel size

number of parameters = 4 * h * ( k**2 * (i+h) + 1 )  = 2949632

if k == 1, ConvLSTM is just a LSTM.

You can check the original paper for detail.
https://arxiv.org/abs/1506.04214