src/transformers/models/layoutlmv2/modeling_layoutlmv2.py/LayoutLMv2ForQuestionAnswering/__init__
class LayoutLMv2ForQuestionAnswering:    def __init__(self, config, has_visual_segment_embedding=True):
        super().__init__(config)
        self.num_labels = config.num_labels
        config.has_visual_segment_embedding = has_visual_segment_embedding
        self.layoutlmv2 = LayoutLMv2Model(config)
        self.qa_outputs = nn.Linear(config.hidden_size, config.num_labels)

        # Initialize weights and apply final processing
        self.post_init()