MCPcopy Create free account
hub / github.com/geekcomputers/Python / forward

Method forward

ML/src/python/neuralforge/nn/modules.py:83–86  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

81 self.bias = nn.Parameter(torch.zeros(normalized_shape))
82
83 def forward(self, x):
84 mean = x.mean(-1, keepdim=True)
85 std = x.std(-1, keepdim=True)
86 return self.weight * (x - mean) / (std + self.eps) + self.bias
87
88class GroupNorm(nn.Module):
89 def __init__(self, num_groups, num_channels, eps=1e-5):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected