(self, config)
| 1363 | _keys_to_ignore_on_load_missing = [r"position_ids"] |
| 1364 | |
| 1365 | def __init__(self, config): |
| 1366 | super().__init__(config) |
| 1367 | self.num_labels = config.num_labels |
| 1368 | |
| 1369 | self.roberta = RobertaModel(config, add_pooling_layer=False) |
| 1370 | classifier_dropout = ( |
| 1371 | config.classifier_dropout if config.classifier_dropout is not None else config.hidden_dropout_prob |
| 1372 | ) |
| 1373 | self.dropout = nn.Dropout(classifier_dropout) |
| 1374 | self.classifier = nn.Linear(config.hidden_size, config.num_labels) |
| 1375 | |
| 1376 | # Initialize weights and apply final processing |
| 1377 | self.post_init() |
| 1378 | |
| 1379 | @add_start_docstrings_to_model_forward(ROBERTA_INPUTS_DOCSTRING.format("batch_size, sequence_length")) |
| 1380 | @add_code_sample_docstrings( |
nothing calls this directly
no test coverage detected