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

Method __init__

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

Source from the content-addressed store, hash-verified

525
526class BertEncoder(nn.Module):
527 def __init__(self, config):
528 super(BertEncoder, self).__init__()
529 # layer = BertLayer(config)
530 # self.layer = nn.ModuleList([copy.deepcopy(layer) for _ in range(config.num_hidden_layers)])
531 self.layer = nn.ModuleList([BertLayer(config) for _ in range(config.num_hidden_layers)])
532
533 # def forward(self, hidden_states, attention_mask, output_all_encoded_layers=True):
534 # all_encoder_layers = []

Callers

nothing calls this directly

Calls 2

BertLayerClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected