MCPcopy Create free account
hub / github.com/deepbrainai-research/float / forward

Method forward

models/float/FMT.py:165–170  ·  view source on GitHub ↗
(self, x, c, mask=None)

Source from the content-addressed store, hash-verified

163 return x * (1 + scale) + shift
164
165 def forward(self, x, c, mask=None) -> torch.Tensor:
166 assert mask is not None
167 shift_msa, scale_msa, gate_msa, shift_mlp, scale_mlp, gate_mlp = self.adaLN_modulation(c).chunk(6, dim=-1)
168 x = x + gate_msa * self.attn(self.framewise_modulate(self.norm1(x), shift_msa, scale_msa), mask = mask)
169 x = x + gate_mlp * self.mlp(self.framewise_modulate(self.norm2(x), shift_mlp, scale_mlp))
170 return x
171
172class Decoder(nn.Module):
173 """

Callers

nothing calls this directly

Calls 1

framewise_modulateMethod · 0.95

Tested by

no test coverage detected