MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / __init__

Method __init__

tests/unit/modelingpreln.py:451–458  ·  view source on GitHub ↗
(self, config, weights, biases)

Source from the content-addressed store, hash-verified

449class BertEncoder(nn.Module):
450
451 def __init__(self, config, weights, biases):
452 super(BertEncoder, self).__init__()
453 self.FinalLayerNorm = BertLayerNorm(config.hidden_size, eps=1e-12)
454
455 self.layer = nn.ModuleList(
456 [copy.deepcopy(BertLayer(i, config, weights, biases)) for i in range(config.num_hidden_layers)])
457 self.grads = []
458 self.graph = []
459
460 def get_grads(self):
461 return self.grads

Callers

nothing calls this directly

Calls 2

BertLayerClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected