MCPcopy Create free account
hub / github.com/THUDM/GLM / __init__

Method __init__

model/modeling_bert.py:673–676  ·  view source on GitHub ↗
(self, config, bert_model_embedding_weights)

Source from the content-addressed store, hash-verified

671
672class BertPreTrainingHeads(nn.Module):
673 def __init__(self, config, bert_model_embedding_weights):
674 super(BertPreTrainingHeads, self).__init__()
675 self.predictions = BertLMPredictionHead(config, bert_model_embedding_weights)
676 self.seq_relationship = nn.Linear(config.hidden_size, 2)
677
678 def forward(self, sequence_output, pooled_output):
679 prediction_scores = self.predictions(sequence_output)

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45

Tested by

no test coverage detected