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

Method forward

diff2flow/models/unet/attention.py:52–54  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

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)
54 return x * F.gelu(gate)
55
56
57class FeedForward(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected