MCPcopy
hub / github.com/deepspeedai/DeepSpeed / __init__

Method __init__

tests/unit/modeling.py:473–481  ·  view source on GitHub ↗
(self, config, weights, biases)

Source from the content-addressed store, hash-verified

471class BertEncoder(nn.Module):
472
473 def __init__(self, config, weights, biases):
474 super(BertEncoder, self).__init__()
475 #layer = BertLayer(config, weights, biases)
476 self.FinalLayerNorm = BertLayerNorm(config.hidden_size, eps=1e-12)
477
478 self.layer = nn.ModuleList(
479 [copy.deepcopy(BertLayer(i, config, weights, biases)) for i in range(config.num_hidden_layers)])
480 self.grads = []
481 self.graph = []
482
483 def get_grads(self):
484 return self.grads

Callers

nothing calls this directly

Calls 3

BertLayerNormClass · 0.70
BertLayerClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected