MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / LinearGEGLU

Class LinearGEGLU

k_diffusion/models/modules.py:155–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153
154
155class LinearGEGLU(nn.Linear):
156 def __init__(self, in_features, out_features, bias=True):
157 super().__init__(in_features, out_features * 2, bias=bias)
158 self.out_features = out_features
159
160 def forward(self, x):
161 flops.op(flops.op_linear, x.shape, self.weight.shape)
162 return linear_geglu(x, self.weight, self.bias)
163
164
165class RMSNorm(nn.Module):

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected