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

Method forward

bert/modeling_bert.py:464–470  ·  view source on GitHub ↗
(self, hidden_states)

Source from the content-addressed store, hash-verified

462 self.activation = nn.Tanh()
463
464 def forward(self, hidden_states):
465 # We "pool" the model by simply taking the hidden state corresponding
466 # to the first token.
467 first_token_tensor = hidden_states[:, 0]
468 pooled_output = self.dense(first_token_tensor)
469 pooled_output = self.activation(pooled_output)
470 return pooled_output
471
472
473class BertPredictionHeadTransform(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected