Solved by ptrblck in post #2 
              
              
                You could use the view operation as: 
N, C, T, H, W
x = torch.randn(B, C, T, H, W]
x = x.view(x.size(0), -1, x.size(3), x.size(4))