src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py/TFDebertaV2DisentangledSelfAttention/transpose_for_scores
class TFDebertaV2DisentangledSelfAttention:    def transpose_for_scores(self, tensor: tf.Tensor, attention_heads: int) -> tf.Tensor:
        shape = shape_list(tensor)[:-1] + [attention_heads, -1]
        # Reshape from [batch_size, seq_length, all_head_size] to [batch_size, seq_length, num_attention_heads, attention_head_size]
        tensor = tf.reshape(tensor=tensor, shape=shape)
        x_shape = shape_list(tensor)
        return tf.reshape(tf.transpose(tensor, perm=[0, 2, 1, 3]), shape=[-1, x_shape[1], x_shape[-1]])