MCPcopy Index your code
hub / github.com/deepspeedai/DeepSpeedExamples / BertAttention

Class BertAttention

bing_bert/nvidia/modeling.py:412–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410
411
412class BertAttention(nn.Module):
413 def __init__(self, config):
414 super(BertAttention, self).__init__()
415 self.self = BertSelfAttention(config)
416 self.output = BertSelfOutput(config)
417
418 def forward(self, input_tensor, attention_mask):
419 self_output = self.self(input_tensor, attention_mask)
420 attention_output = self.output(self_output, input_tensor)
421 return attention_output
422
423
424class BertIntermediate(nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected