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

Method __init__

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

Source from the content-addressed store, hash-verified

1124 """
1125
1126 def __init__(self, config):
1127 super(BertForNextSentencePrediction, self).__init__(config)
1128 self.bert = BertModel(config)
1129 self.cls = BertOnlyNSPHead(config)
1130 self.apply(self.init_bert_weights)
1131
1132 def forward(self, input_ids, token_type_ids=None, attention_mask=None, next_sentence_label=None,
1133 checkpoint_activations=False):

Callers

nothing calls this directly

Calls 4

BertModelClass · 0.85
BertOnlyNSPHeadClass · 0.85
applyMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected