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

Class BertIntermediate

bing_bert/nvidia/modeling.py:424–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422
423
424class BertIntermediate(nn.Module):
425 def __init__(self, config):
426 super(BertIntermediate, self).__init__()
427 self.dense_act = LinearActivation(config.hidden_size, config.intermediate_size, act=config.hidden_act)
428
429 def forward(self, hidden_states):
430 hidden_states = self.dense_act(hidden_states)
431 return hidden_states
432
433
434class BertOutput(nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected