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

Class BertIntermediate

tests/unit/modeling.py:340–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338
339
340class BertIntermediate(nn.Module):
341
342 def __init__(self, config, weights, biases):
343 super(BertIntermediate, self).__init__()
344 self.dense_act = LinearActivation(config.hidden_size,
345 config.intermediate_size,
346 weights,
347 biases,
348 act=config.hidden_act)
349
350 def forward(self, hidden_states):
351 hidden_states = self.dense_act(hidden_states)
352 return hidden_states
353
354
355class BertOutput(nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected