(self, config)
| 1257 | """ |
| 1258 | |
| 1259 | def __init__(self, config): |
| 1260 | super(BertForMultipleChoice, self).__init__(config) |
| 1261 | self.bert = BertModel(config) |
| 1262 | self.dropout = nn.Dropout(config.hidden_dropout_prob) |
| 1263 | self.classifier = nn.Linear(config.hidden_size, 1) |
| 1264 | self.apply(self.init_bert_weights) |
| 1265 | |
| 1266 | def forward(self, input_ids, token_type_ids=None, attention_mask=None, labels=None, checkpoint_activations=False): |
| 1267 | batch_size, num_choices = input_ids.shape[:2] |