MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / LinearNorm

Class LinearNorm

kokoro/modules.py:11–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10
11class LinearNorm(nn.Module):
12 def __init__(self, in_dim, out_dim, bias=True, w_init_gain='linear'):
13 super(LinearNorm, self).__init__()
14 self.linear_layer = nn.Linear(in_dim, out_dim, bias=bias)
15 nn.init.xavier_uniform_(self.linear_layer.weight, gain=nn.init.calculate_gain(w_init_gain))
16
17 def forward(self, x):
18 return self.linear_layer(x)
19
20
21class LayerNorm(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected