RuntimeError: input.size(-1) must be equal to input_size. 3DCNN+GRU

Hi. I am passing an input of shape torch.Size([6, 8, 3, 16, 120, 120]) to 3D CNN + GRU architecture
. I have trained model with shape torch.Size([4, 8, 3, 16, 120, 120]) What i think the first index is a batch size and it can be variable. But i am not sure why changing it is throwing error.

This is my forward function. I am using batch first in GRU layer

x=x.reshape(-1,*x.shape[2::])
x=self.video_model(x.float())
x=x.reshape(4,-1,x.shape[1])
x,x1=self.gru(x.permute(0,2,1))