Sweet, didn’t know about .permute!
As a somewhat related question, any idea if there is a way of doing data.view(F*C, H, W) without having to specify the remaining dimensions? Something like data.flatten(0, 1) which would be equivalent to data.reshape(-1, *data.shape[2:])?