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

Method __init__

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

Source from the content-addressed store, hash-verified

407class BertEncoder(nn.Module):
408
409 def __init__(self, config, weights, biases):
410 super(BertEncoder, self).__init__()
411 self.FinalLayerNorm = BertLayerNorm(config.hidden_size, eps=1e-12)
412
413 self.layer = nn.ModuleList(
414 [copy.deepcopy(BertLayer(i, config, weights, biases)) for i in range(config.num_hidden_layers)])
415 self.grads = []
416 self.graph = []
417
418 def get_grads(self):
419 return self.grads

Callers

nothing calls this directly

Calls 2

BertLayerClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected