src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py/TFLayoutLMv3SelfAttention/transpose_for_scores
class TFLayoutLMv3SelfAttention:    def transpose_for_scores(self, x: tf.Tensor):
        shape = tf.shape(x)
        new_shape = (
            shape[0],  # batch_size
            shape[1],  # seq_length
            self.num_attention_heads,
            self.attention_head_size,
        )
        x = tf.reshape(x, new_shape)
        return tf.transpose(x, perm=[0, 2, 1, 3])  # batch_size, num_heads, seq_length, attention_head_size