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

Method forward

tests/unit/modeling.py:283–287  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

281 self.variance_epsilon = eps
282
283 def forward(self, x):
284 u = x.mean(-1, keepdim=True)
285 s = (x - u).pow(2).mean(-1, keepdim=True)
286 x = (x - u) / torch.sqrt(s + self.variance_epsilon)
287 return self.weight * x + self.bias
288
289
290class BertSelfAttention(nn.Module):

Callers

nothing calls this directly

Calls 1

meanMethod · 0.45

Tested by

no test coverage detected