src/transformers/models/xlm_prophetnet/modeling_xlm_prophetnet.py/XLMProphetNetNgramSelfAttention/_shape
class XLMProphetNetNgramSelfAttention:    def _shape(self, tensor, seq_len, batch_size):
        return tensor.view(batch_size, seq_len, self.num_attn_heads, self.head_dim).transpose(1, 2).contiguous()