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

Method __init__

k_diffusion/models/modules.py:610–615  ·  view source on GitHub ↗
(self, in_features, out_features, patch_size=(2, 2))

Source from the content-addressed store, hash-verified

608
609class TokenSplitWithoutSkip(nn.Module):
610 def __init__(self, in_features, out_features, patch_size=(2, 2)):
611 super().__init__()
612 self.h = patch_size[0]
613 self.w = patch_size[1]
614 self.proj = apply_wd(Linear(in_features, out_features * self.h * self.w, bias=False))
615 nn.init.zeros_(self.proj.weight)
616
617 def forward(self, x):
618 x = self.proj(x)

Callers

nothing calls this directly

Calls 3

apply_wdFunction · 0.85
LinearClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected