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

Method forward

model/modeling_bert.py:678–685  ·  view source on GitHub ↗
(self, sequence_output, pooled_output)

Source from the content-addressed store, hash-verified

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)
680 for p in self.seq_relationship.parameters():
681 if p is None:
682 continue
683 pooled_output = pooled_output.type_as(p)
684 seq_relationship_score = self.seq_relationship(pooled_output)
685 return prediction_scores, seq_relationship_score
686
687
688class PreTrainedBertModel(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected