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

Method __init__

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

Source from the content-addressed store, hash-verified

1060 """
1061
1062 def __init__(self, config):
1063 super(BertForMaskedLM, self).__init__(config)
1064 self.bert = BertModel(config)
1065 self.cls = BertOnlyMLMHead(config, self.bert.embeddings.word_embeddings.weight)
1066 self.apply(self.init_bert_weights)
1067
1068 def forward(self, input_ids, token_type_ids=None, attention_mask=None, masked_lm_labels=None,
1069 checkpoint_activations=False):

Callers

nothing calls this directly

Calls 4

BertModelClass · 0.85
BertOnlyMLMHeadClass · 0.85
applyMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected