src/transformers/models/mctct/modeling_mctct.py/MCTCTSelfAttention/reshape_fortran
class MCTCTSelfAttention:    def reshape_fortran(self, x, shape):
        if len(x.shape) > 0:
            x = x.permute(*reversed(range(len(x.shape))))
        return x.reshape(*reversed(shape)).permute(*reversed(range(len(shape))))