src/transformers/models/oneformer/modeling_oneformer.py/OneFormerAttention/_shape
class OneFormerAttention:    def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int):
        return tensor.view(batch_size, seq_len, self.num_heads, self.head_dim).transpose(1, 2).contiguous()