I have a 4D tensor of shape [32,64,64,3] which corresponds to [batch, timeframes, frequency_bins, features] and I do tensor.flatten(start_dim=2). I understand the shape will then transform to [32,64,64*3] --> [batch,timeframes,frequency_bins*features] -  but in terms of the actual ordering of the elements within that  new flattened dimension of 64*3 are the first 64 indexes relating to what would have been [:,:,:,0] the second 64 [:,:,:,1] and the final 64 [:,:,:,2]