MCPcopy Create free account
hub / github.com/CompVis/diff2flow / __init__

Method __init__

diff2flow/models/unet/attention.py:48–50  ·  view source on GitHub ↗
(self, dim_in, dim_out)

Source from the content-addressed store, hash-verified

46# feedforward
47class GEGLU(nn.Module):
48 def __init__(self, dim_in, dim_out):
49 super().__init__()
50 self.proj = nn.Linear(dim_in, dim_out * 2)
51
52 def forward(self, x):
53 x, gate = self.proj(x).chunk(2, dim=-1)

Callers 6

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected