(self, config)
| 1476 | ) |
| 1477 | class BertForQuestionAnswering(BertPreTrainedModel): |
| 1478 | def __init__(self, config): |
| 1479 | super().__init__(config) |
| 1480 | self.num_labels = config.num_labels |
| 1481 | |
| 1482 | self.bert = BertModel(config) |
| 1483 | self.qa_outputs = nn.Linear(config.hidden_size, config.num_labels) |
| 1484 | |
| 1485 | self.init_weights() |
| 1486 | |
| 1487 | @add_start_docstrings_to_callable(BERT_INPUTS_DOCSTRING.format("(batch_size, sequence_length)")) |
| 1488 | @add_code_sample_docstrings(tokenizer_class=_TOKENIZER_FOR_DOC, checkpoint="bert-base-uncased") |
nothing calls this directly
no test coverage detected