Calculate number of parameters for ConvLSTM2D layer time_distributed_24 (TimeDis (None, 16, 64, 64, 512)   0         



conv_lst_m2d_2 (ConvLSTM2D)  (None, 16, 64, 64, 128)   2949632   



time_distributed_25 (TimeDis (None, 16, 64, 64, 128)   512       



time_distributed_26 (TimeDis (None, 16, 128, 128, 128) 0         

For example, why does this ConvLSTM2D layer have 2949632 parameters?
A standard LSTM layer has 4(n*m + n^2 + n) parameters where m = input dim, n = output dim.

A standard 3x3 conv layer with 128 kernels over a 64x64x512 tensor would have 3x3x512x128 parameters

What would be the n and m for the LSTM part?
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