Thanks for your reply. You solved my problem but still there is a little problem:
import torch
import numpy as np
import torch.nn as nn
B,h,w,Sr,b,n=16,32,56,0.1,8,25
kernel_size=(1,1,int(np.ceil(0.1*b*b)))
x=torch.rand(B,int(np.ceil(0.1*b*b)),n,h,w)
print(x.shape)
conv=nn.Conv3d(int(np.ceil(0.1*b*b)),b*b,kernel_size)
conv(x).shape

the output was:
torch.Size([16, 7, 25, 32, 56])

torch.Size([16, 64, 25, 32, 50])

Why 56 is changed to 50?
would you mind explain it or introduce me a source that explains this kind of reshaping stuff ?