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

Method __init__

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

Source from the content-addressed store, hash-verified

589
590class BertPredictionHeadTransform(nn.Module):
591 def __init__(self, config):
592 super(BertPredictionHeadTransform, self).__init__()
593 self.dense = nn.Linear(config.hidden_size, config.hidden_size)
594 self.transform_act_fn = ACT2FN[config.hidden_act] \
595 if isinstance(config.hidden_act, str) else config.hidden_act
596 self.LayerNorm = BertLayerNorm(config.hidden_size, eps=config.layernorm_epsilon)
597 self.fp32_layernorm = config.fp32_layernorm
598
599 def forward(self, hidden_states):
600 hidden_states = self.dense(hidden_states)

Callers

nothing calls this directly

Calls 2

BertLayerNormClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected