MCPcopy Create free account
hub / github.com/Hzfinfdu/Diffusion-BERT / __init__

Method __init__

models/modeling_bert.py:1621–1632  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

1619)
1620class BertForMultipleChoice(BertPreTrainedModel):
1621 def __init__(self, config):
1622 super().__init__(config)
1623
1624 self.bert = BertModel(config)
1625 classifier_dropout = (
1626 config.classifier_dropout if config.classifier_dropout is not None else config.hidden_dropout_prob
1627 )
1628 self.dropout = nn.Dropout(classifier_dropout)
1629 self.classifier = nn.Linear(config.hidden_size, 1)
1630
1631 # Initialize weights and apply final processing
1632 self.post_init()
1633
1634 @add_start_docstrings_to_model_forward(BERT_INPUTS_DOCSTRING.format("batch_size, num_choices, sequence_length"))
1635 @add_code_sample_docstrings(

Callers

nothing calls this directly

Calls 2

BertModelClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected