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

Method __init__

ML/src/python/neuralforge/nn/modules.py:89–95  ·  view source on GitHub ↗
(self, num_groups, num_channels, eps=1e-5)

Source from the content-addressed store, hash-verified

87
88class GroupNorm(nn.Module):
89 def __init__(self, num_groups, num_channels, eps=1e-5):
90 super().__init__()
91 self.num_groups = num_groups
92 self.num_channels = num_channels
93 self.eps = eps
94 self.weight = nn.Parameter(torch.ones(num_channels))
95 self.bias = nn.Parameter(torch.zeros(num_channels))
96
97 def forward(self, x):
98 N, C, H, W = x.shape

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected