in models/swin_transformer_3d.py [0:0]
def forward(self, x):
if x.ndim == 4:
# B, C, H, W -> B, C, T, H, W
return x.unsqueeze(2)
elif x.ndim == 5:
return x
else:
raise ValueError(f"Dimension incorrect {x.shape}")