src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py/TFLayoutLMv3Attention/call
class TFLayoutLMv3Attention:    def call(
        self,
        hidden_states: tf.Tensor,
        attention_mask: Optional[tf.Tensor],
        head_mask: Optional[tf.Tensor],
        output_attentions: bool,
        rel_pos: Optional[tf.Tensor] = None,
        rel_2d_pos: Optional[tf.Tensor] = None,
        training: bool = False,
    ) -> Union[Tuple[tf.Tensor], Tuple[tf.Tensor, tf.Tensor]]:
        self_outputs = self.self_attention(
            hidden_states,
            attention_mask,
            head_mask,
            output_attentions,
            rel_pos,
            rel_2d_pos,
            training=training,
        )
        attention_output = self.self_output(self_outputs[0], hidden_states, training=training)
        outputs = (attention_output,) + self_outputs[1:]  # add attentions if we output them
        return outputs