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

Method __init__

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

Source from the content-addressed store, hash-verified

993 """
994
995 def __init__(self, config):
996 super(BertForPreTraining, self).__init__(config)
997 self.bert = BertModel(config)
998 self.cls = BertPreTrainingHeads(config, self.bert.embeddings.word_embeddings.weight)
999 self.apply(self.init_bert_weights)
1000
1001 def forward(self, input_ids, token_type_ids=None, attention_mask=None, masked_lm_labels=None,
1002 next_sentence_label=None, checkpoint_activations=False):

Callers

nothing calls this directly

Calls 4

BertModelClass · 0.85
applyMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected