I don’t undestand at all.
Which architecture are you using?
You probably can reshape everything in the batch dimension and then undo for the 3D processing.
ie
input = torch.rand(1,5,3,224,224) which is a 3D tensor of shape (B,T,C,H,W)
so the  your reshape
input=input.view(-1,3,224,224)
#you apply 2d processing
output = conv(input)
# undo the reshaping
input3d = output.view(1,5,C',H',W')
output3d = conv3d(input3d)