MCPcopy Create free account
hub / github.com/SooLab/CGFormer / BertOnlyNSPHead

Class BertOnlyNSPHead

bert/modeling_bert.py:520–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518
519
520class BertOnlyNSPHead(nn.Module):
521 def __init__(self, config):
522 super().__init__()
523 self.seq_relationship = nn.Linear(config.hidden_size, 2)
524
525 def forward(self, pooled_output):
526 seq_relationship_score = self.seq_relationship(pooled_output)
527 return seq_relationship_score
528
529
530class BertPreTrainingHeads(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected