src/transformers/models/perceiver/modeling_perceiver.py/PerceiverSelfAttention/transpose_for_scores
class PerceiverSelfAttention:    def transpose_for_scores(self, x, channels_per_head):
        new_x_shape = x.size()[:-1] + (self.num_heads, channels_per_head)
        x = x.view(*new_x_shape)
        return x.permute(0, 2, 1, 3)