src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py/TFLayoutLMv3MainLayer/__init__
class TFLayoutLMv3MainLayer:    def __init__(self, config: LayoutLMv3Config, **kwargs):
        super().__init__(**kwargs)

        self.config = config

        if config.text_embed:
            self.embeddings = TFLayoutLMv3TextEmbeddings(config, name="embeddings")

        if config.visual_embed:
            self.patch_embed = TFLayoutLMv3PatchEmbeddings(config, name="patch_embed")
            self.LayerNorm = tf.keras.layers.LayerNormalization(epsilon=config.layer_norm_eps, name="LayerNorm")
            self.dropout = tf.keras.layers.Dropout(config.hidden_dropout_prob, name="dropout")

            if config.has_relative_attention_bias or config.has_spatial_attention_bias:
                image_size = config.input_size // config.patch_size
                self.init_visual_bbox(image_size=(image_size, image_size))

            self.norm = tf.keras.layers.LayerNormalization(epsilon=1e-6, name="norm")

        self.encoder = TFLayoutLMv3Encoder(config, name="encoder")