MCPcopy Index your code
hub / github.com/THUDM/GLM / __init__

Method __init__

model/modeling_bert.py:1259–1264  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

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]

Callers

nothing calls this directly

Calls 3

BertModelClass · 0.85
applyMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected