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

Method __init__

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

Source from the content-addressed store, hash-verified

372class BertLayer(nn.Module):
373
374 def __init__(self, i, config, weights, biases):
375 super(BertLayer, self).__init__()
376 self.attention = BertAttention(i, config, weights, biases)
377 self.intermediate = BertIntermediate(config, weights, biases)
378 self.output = BertOutput(config, weights, biases)
379 self.weight = weights
380 self.biases = biases
381
382 def forward(self, hidden_states, attention_mask, grads, collect_all_grads=False):
383 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