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

Method __init__

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

Source from the content-addressed store, hash-verified

432class BertLayer(nn.Module):
433
434 def __init__(self, i, config, weights, biases):
435 super(BertLayer, self).__init__()
436 self.attention = BertAttention(i, config, weights, biases)
437 self.intermediate = BertIntermediate(config, weights, biases)
438 self.output = BertOutput(config, weights, biases)
439 self.weight = weights
440 self.biases = biases
441
442 def forward(self, hidden_states, attention_mask, grads, collect_all_grads=False):
443 attention_output = self.attention(hidden_states, attention_mask)

Callers

nothing calls this directly

Calls 4

BertAttentionClass · 0.70
BertIntermediateClass · 0.70
BertOutputClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected