(self, config)
| 1207 | ) |
| 1208 | class BertForSequenceClassification(BertPreTrainedModel): |
| 1209 | def __init__(self, config): |
| 1210 | super().__init__(config) |
| 1211 | self.num_labels = config.num_labels |
| 1212 | |
| 1213 | self.bert = BertModel(config) |
| 1214 | self.dropout = nn.Dropout(config.hidden_dropout_prob) |
| 1215 | self.classifier = nn.Linear(config.hidden_size, config.num_labels) |
| 1216 | |
| 1217 | self.init_weights() |
| 1218 | |
| 1219 | @add_start_docstrings_to_callable(BERT_INPUTS_DOCSTRING.format("(batch_size, sequence_length)")) |
| 1220 | @add_code_sample_docstrings(tokenizer_class=_TOKENIZER_FOR_DOC, checkpoint="bert-base-uncased") |
nothing calls this directly
no test coverage detected